Skip to content

Commit

Permalink
Test for static linking capability on the host, and complain if we ne…
Browse files Browse the repository at this point in the history
…ed it but it isn't there.
  • Loading branch information
landley committed May 25, 2010
1 parent e6ad770 commit ab2d8cd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions host-tools.sh
Expand Up @@ -62,6 +62,23 @@ mkdir -p "$STAGE_DIR" || dienow

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.
Expand Down

0 comments on commit ab2d8cd

Please sign in to comment.