cross compiler for amd64

Chuck Robey chuckr@chuckr.org
Sun Apr 11 17:13:00 GMT 2004


I'm trying to build gcc for my new opteron.  The new RH Fedora I'm 
running has a gcc that won't let me use -m32, so I wanted to build it 
myself.  I have tried now 2 branches (and hammer-3_3 branch, and now 
also gcc-3_4-branch) but I get identical errors.  This is hopefully 
making use of the binutils I just installed, it's the one from date 
040404.  The error's in building libgcc_s.so.1, the linker ld isn't able 
to locate -lc.  Here's the cut'n'paste error:

/home/chuckr/gcc/cvs/gccb/gcc/xgcc -B/home/chuckr/gcc/cvs/gccb/gcc/ 
-B/usr/local/x86_64-unknown-linux-gnu/bin/ 
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem 
/usr/local/x86_64-unknown-linux-gnu/include -isystem 
/usr/local/x86_64-unknown-linux-gnu/sys-include -O2  -DIN_GCC    -W 
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT 
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs 
-Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/32/libgcc.map -o 
32/libgcc_s.so.1  -m32  libgcc/32/_muldi3.o libgcc/32/_negdi2.o 
libgcc/32/_lshrdi3.o libgcc/32/_ashldi3.o libgcc/32/_ashrdi3.o 
libgcc/32/_cmpdi2.o libgcc/32/_ucmpdi2.o libgcc/32/_floatdidf.o 
libgcc/32/_floatdisf.o libgcc/32/_fixunsdfsi.o libgcc/32/_fixunssfsi.o 
libgcc/32/_fixunsdfdi.o libgcc/32/_fixdfdi.o libgcc/32/_fixunssfdi.o 
libgcc/32/_fixsfdi.o libgcc/32/_fixxfdi.o libgcc/32/_fixunsxfdi.o 
libgcc/32/_floatdixf.o libgcc/32/_fixunsxfsi.o libgcc/32/_fixtfdi.o 
libgcc/32/_fixunstfdi.o libgcc/32/_floatditf.o libgcc/32/_clear_cache.o 
libgcc/32/_trampoline.o libgcc/32/__main.o libgcc/32/_absvsi2.o 
libgcc/32/_absvdi2.o libgcc/32/_addvsi3.o libgcc/32/_addvdi3.o 
libgcc/32/_subvsi3.o libgcc/32/_subvdi3.o libgcc/32/_mulvsi3.o 
libgcc/32/_mulvdi3.o libgcc/32/_negvsi2.o libgcc/32/_negvdi2.o 
libgcc/32/_ctors.o libgcc/32/_ffssi2.o libgcc/32/_ffsdi2.o 
libgcc/32/_clz.o libgcc/32/_clzsi2.o libgcc/32/_clzdi2.o 
libgcc/32/_ctzsi2.o libgcc/32/_ctzdi2.o libgcc/32/_popcount_tab.o 
libgcc/32/_popcountsi2.o libgcc/32/_popcountdi2.o libgcc/32/_paritysi2.o 
libgcc/32/_paritydi2.o libgcc/32/_divdi3.o libgcc/32/_moddi3.o 
libgcc/32/_udivdi3.o libgcc/32/_umoddi3.o libgcc/32/_udiv_w_sdiv.o 
libgcc/32/_udivmoddi4.o  libgcc/32/unwind-dw2.o 
libgcc/32/unwind-dw2-fde-glibc.o libgcc/32/unwind-sjlj.o 
libgcc/32/gthr-gnat.o libgcc/32/unwind-c.o -lc && rm -f libgcc_s_32.so 
&& ln -s 32/libgcc_s.so.1 libgcc_s_32.so
/usr/local/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status

I had it suggested that I try to install a cross, to i686, and use that 
to build it.  If I do that, I get nearly the same error, but instead of 
unable to find -lc, it reports unable to find crti.o, but iut's still in 
building libgcc_s.so.1.

Can I get some help, please?

I have



More information about the Gcc-help mailing list