diff options
author | Danny Boelens <dannyb@enfocus.com> | 2012-07-20 15:26:07 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-21 00:53:40 +0200 |
commit | 13b1395924032e35b678b3254a5b8315b6862f6a (patch) | |
tree | e486319f484bbddceea993b7ccd1ad762e23a5d0 /config.tests | |
parent | 55640cd3eeae4e9b9589b1a7463190fa4c227b2b (diff) | |
download | qtbase-13b1395924032e35b678b3254a5b8315b6862f6a.tar.gz |
Fix Mac OS X architecture detection for non-default Xcode setup.
The arch.test script is now using SDK settings passed to it.
If you install Xcode without the "UNIX Development" option, this
is essential to let the compiler find standard headers and let
the test program compile successfully.
In addition, let configure pass the SDK settings given on the
command line to the arch.test script.
Change-Id: I49601d3068d83a71e21fdbac287857f2b7abedd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'config.tests')
-rwxr-xr-x | config.tests/unix/arch.test | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test index 3f5f153cc0..9e18597dd3 100755 --- a/config.tests/unix/arch.test +++ b/config.tests/unix/arch.test @@ -6,6 +6,24 @@ SRCDIR=$3 OUTDIR=$4 RESULTFILE=$5 VARPREFIX=$6 +shift 6 + +LFLAGS="$SYSROOT_FLAG" +CXXFLAGS="$SYSROOT_FLAG" + +while [ "$#" -gt 0 ]; do + PARAM=$1 + case $PARAM in + -sdk) + LFLAGS="$LFLAGS -Wl,-syslibroot,$2" + CXXFLAGS="$CXXFLAGS -isysroot $2" + shift + ;; + *) ;; + esac + shift +done + # debuggery [ "$VERBOSE" = "yes" ] && echo "Determining architecture... ($*)" @@ -13,7 +31,7 @@ VARPREFIX=$6 # build a test program but don't run it test -d "$OUTDIR/config.tests/arch" || mkdir -p "$OUTDIR/config.tests/arch" [ -f Makefile ] && $MAKE distclean >/dev/null 2>&1 -OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "LIBS+=$SYSROOT_FLAG" "QMAKE_CXXFLAGS+=$SYSROOT_FLAG" "$SRCDIR/config.tests/arch/arch.pro" -o "$OUTDIR/config.tests/arch/Makefile" >/dev/null 2>&1 || echo "qmake is broken" >&2 +OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "$SRCDIR/config.tests/arch/arch.pro" -o "$OUTDIR/config.tests/arch/Makefile" >/dev/null 2>&1 || echo "qmake is broken" >&2 cd "$OUTDIR/config.tests/arch" |