Mercurial > hg > aboriginal
changeset 1093:2de27a5561af
Test for static linking capability on the host, and complain if we need it but it isn't there.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 25 May 2010 10:09:49 -0500 |
parents | 35c5829c877c |
children | fb9423e8bd09 |
files | host-tools.sh |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/host-tools.sh Sun May 23 00:11:05 2010 -0500 +++ b/host-tools.sh Tue May 25 10:09:49 2010 -0500 @@ -62,6 +62,23 @@ PATH="$STAGE_DIR:$PATH" +# Sanity test for the host supporting static linking. + +if [ "$BUILD_STATIC" != none ] +then + $CC "$SOURCES/toys/hello.c" --static -o "$WORK/hello" && + rm "$WORK/hello" + + if [ $? -ne 0 ] + then + echo "Your host toolchain does not support static linking." >&2 + echo "Either install support, or export BUILD_STATIC=none" >&2 + + dienow + fi +fi + + # Start by building busybox. We have no idea what strange things our host # system has (or lacks, such as "which"), so throw busybox at it first # thing.