crt0 in toolchain
Thomas Eschenbacher
Thomas.Eschenbacher at gmx.de
Fri Dec 2 17:32:42 UTC 2005
Peter S. Mazinger wrote:
> [...]
>>>>I built my ARM toolchain with binutils-2.16.1, gcc-4.0.2 and uClibc-0.9.28.
>>>>Linux kernel 2.6.14 works on target mashine. But linker
>>>>searches for crt0.o, when I try to build busybox-1.01.
>>>>There is no such file for ARM arch.
>>>>Only --prefix and --target compiler options were used for cross-gcc building.
>>>>Please explain, where my mistake(s) is(are) or refer me to any usefull URL.
> [...]
> if you want to use uClibc, don't use newlib ... (even if have seen
> --with-newlib somewhere as a gcc configure option, that means only - as of
> gcc - that we do not have glibc, nothing newlib specific)
BTW: we use a toolchain with gcc-3.3.1 (arm7) with newlib for some
years. But you have to be careful if you want to do so. We build uclibc
seperately and force the compiler to use uclibc instead of any builtin
stuff.
This works fine in our environment, you only have to take care that
nothing from newlib gets used and override compiler/linker defaults:
you need some CFLAGS like -nostdinc, and add the uclibc header directory
manually. For the LDFLAGS, you need to pass -fno-builtin and
-nostartfiles and add crt1.o from the uclibc/lib directory manually.
Additionally you might have to fix crt1.S, which IMHO seems to be badly
broken for arm.
However, if you are not forced to do so, you should prefer the
"buildroot" way, which seems to be much easier and straight-forward ;-)
With our toolchain we had success when using non-pic code in
toolchain/newlib and also in uclibc+application. But when switching
uclibc+application to pic code we ran into serious trouble...
Thomas
--
______________________________________________________________________
Thomas Eschenbacher <Thomas.Eschenbacher at gmx.de>
More information about the uClibc
mailing list