1
votes

I tried building gcc-4.5.2 from sources on a Debian 64-bit machine. I ended up having just 64 bit version of the compiler but no 32-bit. When I try to build 32 bit application I see following linker error. when I tried ā€˜-m32ā€² options Iā€™m getting this message /usr/bin/ld: skipping incompatible /usr/local/gcc452/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit statu What should I do to build gcc properly.

1
I think I found the problem, I used --disable-multilib ā€“ kanna

1 Answers

2
votes

You also need a 32bit version of "ld" (the linker). ld is found in the binutils package.