I am trying to build a gcc cross compiler (version 3.3.3) on my SLES 9 32-bit box for s390x which is a 64-bit OS (The target is s390x-ibm-linux, and the host on where this cross compiler will run is SLES 9 32-bit). I first compiled binutils-2.15.90 with target being s390x-ibm-linux, and installed it under /opt/s390x, and this step was fine. Then I copied the headers and libs of s390x glibc-2.3.3 to corresponding directories under /opt/s390x. Then when I was compiling gcc cross compiler, I got the following error. Could anyone give me some ideas of what's wrong? Thanks very much.
Code: Select all
/space1/treex/src/gcc/gcc-3.3.3/gcc/xgcc -B/space1/treex/src/gcc/gcc-3.3.3/gcc/ -B/opt/s390x/s390x-ibm-linux/bin/ -B/opt/s390x/s390x-ibm-linux/lib/ -isystem /opt/s390x/s390x-ibm-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/32/libgcc.map -o 32/libgcc_s.so.1 -m31 libgcc/32/_muldi3.o libgcc/32/_negdi2.o libgcc/32/_lshrdi3.o libgcc/32/_ashldi3.o libgcc/32/_ashrdi3.o libgcc/32/_ffsdi2.o libgcc/32/_clz.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/_exit.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/_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/unwind-c.o -lc && rm -f libgcc_s_32.so && ln -s 32/libgcc_s.so.1 libgcc_s_32.so
/opt/s390x/s390x-ibm-linux/bin/ld: skipping incompatible /opt/s390x/s390x-ibm-linux/lib/libc.so when searching for -lc
/opt/s390x/s390x-ibm-linux/bin/ld: skipping incompatible /opt/s390x/s390x-ibm-linux/lib/libc.a when searching for -lc
/opt/s390x/s390x-ibm-linux/bin/ld: skipping incompatible /opt/s390x/lib/../s390x-ibm-linux/lib/../lib/libc.so when searching for -lc
/opt/s390x/s390x-ibm-linux/bin/ld: skipping incompatible /opt/s390x/lib/../s390x-ibm-linux/lib/../lib/libc.a when searching for -lc
/opt/s390x/s390x-ibm-linux/bin/ld: skipping incompatible /opt/s390x/lib/../s390x-ibm-linux/lib/libc.so when searching for -lc
/opt/s390x/s390x-ibm-linux/bin/ld: skipping incompatible /opt/s390x/lib/../s390x-ibm-linux/lib/libc.a when searching for -lc
/opt/s390x/s390x-ibm-linux/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[2]: *** [32/libgcc_s_32.so] Error 1
make[2]: Leaving directory `/space1/treex/src/gcc/gcc-3.3.3/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/space1/treex/src/gcc/gcc-3.3.3/gcc'
make: *** [all-gcc] Error 2