Cann't find Cross Compiler in menuconfig?
Natanael Copa
natanael.copa at gmail.com
Mon Sep 17 07:06:47 UTC 2007
On Mon, 2007-09-17 at 11:53 +0800, NalaGinrut wrote:
> Hello,everybody!
> I'm a busybox-freshman.And I don't know how to compile busybox to be a
> cross compile version.I mean an ARM cross compile busybox.
> When I got into menuconfig,I cann't find the option 'Do you want to build
> BusyBox with a Cross Compiler.',but it's on my book!
> The cross-tools I used is arm-linux-gcc-3.3.2.While I make busybox-1.7.1
> with 'CROSS_COMPILE ?= arm-linux-', I got an error message below:
>
> CC applets/applets.o
> applets/applets.c:20:2: warning: #warning Static linking against glibc
> produces buggy executables
> applets/applets.c:21:2: warning: #warning (glibc does not cope well with ld
> --gc-sections).
> applets/applets.c:22:2: warning: #warning See
> sources.redhat.com/bugzilla/show_bug.cgi?id=3400
> applets/applets.c:23:2: warning: #warning Note that glibc is unsuitable for
> static linking anyway.
> applets/applets.c:24:2: warning: #warning If you still want to do it, remove
> -Wl,--gc-sections
> applets/applets.c:25:2: warning: #warning from top-level Makefile and remove
> this warning.
> applets/applets.c:26:2: #error Aborting compilation.
> make[1]: *** [applets/applets.o] 错误 1
> make: *** [applets] 错误 2
>
> What should I do?
Read the compiler warnings.
> Please help.Thanks.
ok. glibc is unsuitable for statical linking and it will create buggy
binaries. Try link it dynamically.
If you absolutely want a static linked busybox, try uclibc, which should
give you a smaller executable too.
If you still want to use glibc and still want to do static linking then
you can try to remove -Wl,--gc-sections from the compiler flags.
However, I reccommend either dynamic linking or static linking against
uclibc. You find the compiler flag in the toplevel Makefile
If you want more details about statical linking to glibc have a look at
http://sources.redhat.com/bugzilla/show_bug.cgi?id=3400
-nc
More information about the busybox
mailing list