view sources/sections/busybox.build @ 1036:e021bba5e22e

Yank ugly STAGE_DIR adjustment and instead teach busybox/toybox bilds to auto-detect "bin" directory on install. (And while we're at it, don't build hello-dynamic on static-only system.)
author Rob Landley <rob@landley.net>
date Mon, 12 Apr 2010 00:04:11 -0500
parents fc134a13357e
children cb4dbdb7f2cd
line wrap: on
line source

# Build busybox statically by default, but don't statically link against
# glibc (during host_tools) build because glibc is buggy and can't combine
# --static with --gc-sections.

# Build busybox

make allyesconfig KCONFIG_ALLCONFIG="${SOURCES}/trimconfig-busybox" &&
cp .config "$WORK"/config-busybox &&
LDFLAGS="$LDFLAGS $STATIC_DEFAULT_FLAGS" make -j $CPUS $VERBOSITY $DO_CROSS &&
make busybox.links || dienow

[ -d "$STAGE_DIR/bin" ] && INSTDIR="$STAGE_DIR/bin" || INSTDIR="$STAGE_DIR"

cp busybox${SKIP_STRIP:+_unstripped} "$INSTDIR/busybox" || dienow

for i in $(sed 's@.*/@@' busybox.links)
do
  [ ! -f "INSTDIR/$i" ] && (ln -sf busybox "$INSTDIR/$i" || dienow)
done