diff sources/sections/busybox.sh @ 865:15522b490e53

Build busybox static by default (but not for host-tools.sh, since static glibc is buggy, and let .config to switch it off).
author Rob Landley <rob@landley.net>
date Mon, 26 Oct 2009 20:29:16 -0500
parents 5dd1a99a0737
children f1671488c740
line wrap: on
line diff
--- a/sources/sections/busybox.sh	Mon Oct 26 06:16:45 2009 -0500
+++ b/sources/sections/busybox.sh	Mon Oct 26 20:29:16 2009 -0500
@@ -2,12 +2,17 @@
 
 [ ! -z "$ARCH" ] && DO_CROSS=CROSS_COMPILE=${ARCH}-
 
+# Build busybox statically by default, but don't statically link against
+# glibc because glibc is buggy and can't combine --static with --gc-sections.
+
+[ "$BUILD_STATIC" != "none" ] && [ ! -z "$ARCH" ] && BUSYBOX_STATIC="--static"
+
 # Build busybox
 
 setupfor busybox
 make allyesconfig KCONFIG_ALLCONFIG="${SOURCES}/trimconfig-busybox" &&
 cp .config "$WORK"/config-busybox
-LDFLAGS="$LDFLAGS $STATIC_FLAGS" make -j $CPUS $VERBOSITY $DO_CROSS &&
+LDFLAGS="$LDFLAGS $BUSYBOX_STATIC" make -j $CPUS $VERBOSITY $DO_CROSS &&
 make busybox.links &&
 cp busybox "${STAGE_DIR}"