this is supposed to be a FAQ, but unfortunately it is not.
How would I configure busybox to get linked against my custom Version of uclibc insted of the system glibc?
Unfortunately recent Versions of busybox are no longer statically linkable against glibc.
Sven
.. this message has been created using an outdated OS (UNIX-like) with an
outdated mail- or newsreader (text-only) :-P
/me is giggls@ircnet, http://sven.gegg.us/ on the Web
Didn't find your answer? Ask the community — no account required.
S
Stanislaw Gruszka
Set Makefile CROSS_COMPILE variable to gcc which link with uclibc. There are at least 3 possibilities to get such gcc.
1) Build custom GNU toolchain
2) Use debian uclibc-toolchain wrapper
3) Create custom gcc wrapper
AFAIK Option 1) is a must if you plan to use floating point. I use 3) option with below script but it's unreliable (I show it only for reference)
linking="yes" static="no" busybox="no" for opt in $* ; do case $opt in -c|-S|-E) linking="no" ;; -static) static="yes" ;; busybox_unstripped) busybox="yes" ;; # FIXME esac done
ldopts= suffix= if [ "$linking" == "yes" ] ; then ldir="${uclibc}/lib/" if [ "$static" == "yes" ] ; then crt1= if [ "$busybox" == "no" ] ; then crt1="${ldir}/Scrt1.o" fi ld_dyn= ld_libs="-L${ldir} -lc -lgcc"
suffix="${ldir}/libc.a ${gcclib}/libgcc.a" else crt1= if [ "$busybox" == "no" ] ; then crt1="${ldir}/crt1.o" fi ld_dyn="-Wl,-rpath,${uclibc}/lib,--dynamic-linker ${uclibc}/lib/ld-uClibc.so" ld_libs="-L${ldir} -lc -lgcc" fi ldopts="$ld_dyn $crt1 $ld_libs" fi incopts="-nostdinc -I${uclibc}/include -I$lnxinc -isystem $gccinc" libopts="-nostdlib -nodefaultlibs"
exec gcc $incopts $libopts $ldopts $* $suffix
S
Sven Geggus
hm, sound complicated...
unfortunately Im unable to backport the debian uclibc package for debian etch.
Hm, this could probable be the way to go. All I need is a static busybox binary after all.
Sven
Threading is a performance hack.
(The Art of Unix Programming by Eric S. Raymond)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web
D
donald
What is an "debian etch" ?
S
Sven Geggus
Debian GNU/Linux 4.0 usually know by its codename "etch" :)
Sven
-- The main thing to note is that when you choose open source you don't get a Windows operating system. (from
formatting link
/me is giggls@ircnet,
formatting link
on the Web
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.