Problem when building a crosscompiler for arm-linux target

David Westberg david.westberg@landala.com
Wed Feb 7 01:37:00 GMT 2001


I am trying to build a toolchain for the arm-linux target hosted on Redhat 7
system.

building the binutils gives me no problem.
/binutils-2.10.1/configure --host=i586-pc-linux-gnu --target=arm-linux
--prefix=/home/davwes/ipaq/tools 
make
make install

works like a charm and installs without any problems.

Building the Crosscompiler is the problem. Configuring goes without any
problem.
mkdir gcc-20010205-cross
cd gcc-20010205-cross
.../gcc-20010205/configure --host=i586-pc-linux-gnu --target=arm-linux
--prefix=/home/davwes/ipaq/tools --disable-threads --with-cpu=strongarm110
--enable-languages=c --with-newlib
make all-gcc

the build stops with the following message:

mv tmp-libgcc.map libgcc.map
/home/davwes/ipaq/gcc-20010205-cross/gcc/xgcc
-B/home/davwes/ipaq/gcc-20010205-cross/gcc/
-B/home/davwes/ipaq/tools/arm-linux/bin/
-B/home/davwes/ipaq/tools/arm-linux/lib/ -isystem
/home/davwes/ipaq/tools/arm-linux/include -O2  -DCROSS_COMPILE -DIN_GCC
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
./include  -fomit-frame-pointer -fPIC -g0  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs
-Wl,--soname=libgcc_s.so.0 -Wl,--version-script=libgcc.map -o libgcc_s.so
libgcc/./_udivsi3.o libgcc/./_divsi3.o libgcc/./_umodsi3.o
libgcc/./_modsi3.o libgcc/./_dvmd_lnx.o libgcc/./_muldi3.o
libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o
libgcc/./_umoddi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o
libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_ffsdi2.o libgcc/./_clz.o
libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_cmpdi2.o
libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o
libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o
libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o
libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o
libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o
libgcc/./_floatditf.o libgcc/./__gcc_bcmp.o libgcc/./_varargs.o
libgcc/./__dummy.o libgcc/./_eprintf.o libgcc/./_bb.o
libgcc/./_clear_cache.o libgcc/./_trampoline.o libgcc/./__main.o
libgcc/./_exit.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o
libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o
libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o
libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_eh.o libgcc/./frame-dwarf2.o
-lc && rm -f libgcc_s.so.0 && ln -s libgcc_s.so libgcc_s.so.0
/home/davwes/ipaq/tools/arm-linux/bin/ld: cannot open crti.o: No such file
or directory
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory `/home/davwes/ipaq/gcc-20010205-cross/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/home/davwes/ipaq/gcc-20010205-cross/gcc'
make: *** [all-gcc] Error 2



adding -v  -Wl,-V to the faling command gives the following output:

 /home/davwes/ipaq/gcc-20010205-cross/gcc/xgcc
-B/home/davwes/ipaq/gcc-20010205-cross/gcc/
-B/home/davwes/ipaq/tools/arm-linux/bin/
-B/home/davwes/ipaq/tools/arm-linux/lib/ -isystem
/home/davwes/ipaq/tools/arm-linux/include -O2  -DCROSS_COMPILE -DIN_GCC
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
./include  -fomit-frame-pointer -fPIC -g0  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs
-Wl,--soname=libgcc_s.so.0 -Wl,--version-script=libgcc.map -o libgcc_s.so
libgcc/./_udivsi3.o libgcc/./_divsi3.o libgcc/./_umodsi3.o
libgcc/./_modsi3.o libgcc/./_dvmd_lnx.o libgcc/./_muldi3.o
libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o
libgcc/./_umoddi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o
libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_ffsdi2.o libgcc/./_clz.o
libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_cmpdi2.o
libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o
libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o
libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o
libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o
libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o
libgcc/./_floatditf.o libgcc/./__gcc_bcmp.o libgcc/./_varargs.o
libgcc/./__dummy.o libgcc/./_eprintf.o libgcc/./_bb.o
libgcc/./_clear_cache.o libgcc/./_trampoline.o libgcc/./__main.o
libgcc/./_exit.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o
libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o
libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o
libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_eh.o libgcc/./frame-dwarf2.o
-lc -v -Wl,-V && rm -f libgcc_s.so.0 && ln -s libgcc_s.so libgcc_s.so.0
Reading specs from /home/davwes/ipaq/gcc-20010205-cross/gcc/specs
Configured with: ../gcc-20010205/configure --target=arm-linux
--prefix=/home/davwes/ipaq/tools --disable-threads --with-cpu=strongarm110
--enable-languages=c --with-newlib
gcc version 2.97 20010205 (experimental)
 /home/davwes/ipaq/gcc-20010205-cross/gcc/collect2 -shared -dynamic-linker
/lib/ld-linux.so.2 -X -m armelf_linux -p -o libgcc_s.so crti.o
/home/davwes/ipaq/gcc-20010205-cross/gcc/crtbeginS.o
-L/home/davwes/ipaq/gcc-20010205-cross/gcc
-L/home/davwes/ipaq/tools/arm-linux/bin
-L/home/davwes/ipaq/tools/arm-linux/lib
-L/home/davwes/ipaq/tools/lib/gcc-lib/arm-linux/2.97
-L/home/davwes/ipaq/tools/lib/gcc-lib/arm-linux/2.97/../../../../arm-linux/l
ib --soname=libgcc_s.so.0 --version-script=libgcc.map libgcc/./_udivsi3.o
libgcc/./_divsi3.o libgcc/./_umodsi3.o libgcc/./_modsi3.o
libgcc/./_dvmd_lnx.o libgcc/./_muldi3.o libgcc/./_divdi3.o
libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o
libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o
libgcc/./_ashrdi3.o libgcc/./_ffsdi2.o libgcc/./_clz.o
libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_cmpdi2.o
libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o
libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o
libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o
libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o
libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o
libgcc/./_floatditf.o libgcc/./__gcc_bcmp.o libgcc/./_varargs.o
libgcc/./__dummy.o libgcc/./_eprintf.o libgcc/./_bb.o
libgcc/./_clear_cache.o libgcc/./_trampoline.o libgcc/./__main.o
libgcc/./_exit.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o
libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o
libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o
libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_eh.o libgcc/./frame-dwarf2.o
-lc -V /home/davwes/ipaq/gcc-20010205-cross/gcc/crtendS.o crtn.o
/home/davwes/ipaq/tools/arm-linux/bin/ld: cannot open crti.o: No such file
or directory
GNU ld version 2.10.1 (with BFD 2.10.1)
  Supported emulations:
   armelf_linux
   armelf_linux26
   armelf
collect2: ld returned 1 exit status


Why isn't crti.o built since it is required by the linker ?
Why is it required by the linker ?
why is -lc required, I am building a crosscompiler and the library isn't
built yet.
Should it build the libgcc_s.so library at all ?

I have done some experimenting by eliminating crti.o crtn.o and -lc then the
lib was atleast built and build process could continue and later install it.
I do not know, however , the status of the installed compiler after such a
hack.

I actually tried to build glibc-2.2 by using the above crosscompiler but it
failed complaining about an internal error. I don't give the error much
credit since it was built and installed using a HACK.

David Westberg

 

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list