view sources/sections/toybox.build @ 1839:c8293b3ab81f draft default tip

Teach chroot-splice to accept one or two arguments. (Control image now optional.)
author Rob Landley <rob@landley.net>
date Sun, 17 Jan 2016 21:18:52 -0600
parents acaa88463c0c
children
line wrap: on
line source

# Build toybox statically by default, but don't statically link against
# glibc (during host-tools.sh build) because glibc is buggy and can't combine
# --static with --gc-sections. See
# http://elinux.org/images/2/2d/ELC2010-gc-sections_Denys_Vlasenko.pdf
# for details

# Build toybox

for i in defconfig toybox \
  $( [ -z "$BUSYBOX" ] && echo install$([ -z "$ARCH" ] && echo _flat) )
do
  PREFIX="$STAGE_DIR" CFLAGS="$CFLAGS $STATIC_FLAGS" CC= STRIP= \
    make -j $CPUS $VERBOSITY $DO_CROSS $i || dienow
done
cp .config "$WORK"/config-toybox || dienow

# We always need at least oneit

if [ ! -z "$BUSYBOX" ]
then
  ln -sf {$ARCH:+/usr/bin/}toybox "$STAGE_DIR/${ARCH:+sbin/}oneit" || dienow
fi

if [ ! -z "$SKIP_STRIP" ]
then
  cp --remove-destination toybox_unstripped "$INSTDIR/toybox" || dienow
fi