Make LINKER_VERSION settable via env

This commit is contained in:
Thomas Pöchtrager 2015-08-29 13:31:28 +02:00
parent 749d0b14c9
commit 65b384923e

View File

@ -141,6 +141,20 @@ if [ "$PLATFORM" == "Darwin" ]; then
unset PREVCXX
fi
# CCTOOLS
if [ -z $LINKER_VERSION ]; then
if [ "$PLATFORM" == "Darwin" ]; then
PREVCXX=$CXX
CXX+=" -stdlib=libc++"
fi
res=$(check_cxx_stdlib)
if [ "$PLATFORM" == "Darwin" ]; then
CXX=$PREVCXX
unset PREVCXX
fi
if [ $res -ne 0 ]; then
echo "Your C++ standard library is either broken or too old to build ld64-241.9" 1>&2
echo "Building ld64-134.9 instead" 1>&2
@ -150,6 +164,12 @@ if [ $res -ne 0 ]; then
else
LINKER_VERSION=242
fi
fi
if [ "$LINKER_VERSION" != "242" ] && [ "$LINKER_VERSION" != "134.9" ]; then
echo "LINKER_VERSION must be 242 or 134.9"
exit 1
fi
CCTOOLS="cctools-870-ld64-$LINKER_VERSION"
CCTOOLS_TARBALL=$(ls $TARBALL_DIR/$CCTOOLS*.tar.* | head -n1)