[llvm-commits] [llvm-gcc-4.2] r66903 - /llvm-gcc-4.2/trunk/build_gcc
Bob Wilson
bob.wilson at apple.com
Fri Mar 13 09:42:10 PDT 2009
Author: bwilson
Date: Fri Mar 13 11:42:10 2009
New Revision: 66903
URL: http://llvm.org/viewvc/llvm-project?rev=66903&view=rev
Log:
Add a conservative default for the case where MACOS_DEPLOYMENT_TARGET
is not set.
Modified:
llvm-gcc-4.2/trunk/build_gcc
Modified: llvm-gcc-4.2/trunk/build_gcc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/build_gcc?rev=66903&r1=66902&r2=66903&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/build_gcc (original)
+++ llvm-gcc-4.2/trunk/build_gcc Fri Mar 13 11:42:10 2009
@@ -139,15 +139,22 @@
ARM_TOOLROOT=/
fi
-# ARM requires a sysroot option, at least while building the compiler.
+# ARM may require a sysroot option.
ARM_SYSROOT=$ARM_EXTRA_SDK
# If the default sysroot does not exist, try a different location.
if [ ! -d $ARM_SYSROOT ]; then
ARM_SYSROOT=$ARM_PLATFORM/Developer/SDKs/$ARM_IPHONE_SDK
fi
-MACOSX_DEPLOYMENT_MAJOR=`echo $MACOSX_DEPLOYMENT_TARGET | sed 's/\..*//'`
-MACOSX_DEPLOYMENT_MINOR=`echo $MACOSX_DEPLOYMENT_TARGET | sed 's/[0-9]*\.\([0-9]*\).*/\1/'`
+# Split the MACOSX_DEPLOYMENT_TARGET into major/minor versions.
+if [ -z "$MACOSX_DEPLOYMENT_TARGET" ]; then
+ # Anything 10.5 or earlier is treated the same below.
+ MACOSX_DEPLOYMENT_MAJOR=10
+ MACOSX_DEPLOYMENT_MINOR=5
+else
+ MACOSX_DEPLOYMENT_MAJOR=`echo $MACOSX_DEPLOYMENT_TARGET | sed 's/\..*//'`
+ MACOSX_DEPLOYMENT_MINOR=`echo $MACOSX_DEPLOYMENT_TARGET | sed 's/[0-9]*\.\([0-9]*\).*/\1/'`
+fi
if [ $MACOSX_DEPLOYMENT_MAJOR -eq 10 -a \
$MACOSX_DEPLOYMENT_MINOR -le 5 ]; then
ARM_CONFIGFLAGS="$ARM_CONFIGFLAGS --with-sysroot=\"$ARM_SYSROOT\""
More information about the llvm-commits
mailing list