Mercurial > hg > aboriginal
view 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 source
#!/bin/bash [ ! -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 $BUSYBOX_STATIC" make -j $CPUS $VERBOSITY $DO_CROSS && make busybox.links && cp busybox "${STAGE_DIR}" [ $? -ne 0 ] && dienow for i in $(sed 's@.*/@@' busybox.links) do [ ! -f "${STAGE_DIR}/$i" ] && (ln -sf busybox "${STAGE_DIR}/$i" || dienow) done cleanup # Build toybox [ ! -z "$ARCH" ] && DO_CROSS=CROSS_COMPILE=${ARCH}- setupfor toybox make defconfig && CFLAGS="$CFLAGS $STATIC_FLAGS" make $DO_CROSS || dienow if [ -z "$USE_TOYBOX" ] then mv toybox "$STAGE_DIR" && ln -sf toybox "$STAGE_DIR"/patch && ln -sf toybox "$STAGE_DIR"/oneit && ln -sf toybox "$STAGE_DIR"/netcat || dienow else make install_flat PREFIX="$STAGE_DIR" || dienow fi cleanup