Use custom -I,-D and -L flags when building arch-test
Needed for using alternate stdlib implementation like libc++ with clang. Change-Id: I1782f62f5e2ea95e6cff8a1ed646362c0a31645c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
9598448758
commit
c6b91576a6
@ -19,6 +19,24 @@ fi
|
||||
LFLAGS="$SYSROOT_FLAG"
|
||||
CXXFLAGS="$SYSROOT_FLAG"
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
PARAM=$1
|
||||
case $PARAM in
|
||||
-L*|-l*)
|
||||
LFLAGS="$LFLAGS $PARAM"
|
||||
;;
|
||||
-I*)
|
||||
INC=`echo $PARAM | sed -e 's/^-I//'`
|
||||
INCLUDEPATH="$INCLUDEPATH $INC"
|
||||
;;
|
||||
-D*)
|
||||
CXXFLAGS="$CXXFLAGS $PARAM"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# debuggery
|
||||
[ "$VERBOSE" = "yes" ] && echo "Determining architecture... ($*)"
|
||||
|
||||
@ -26,7 +44,7 @@ CXXFLAGS="$SYSROOT_FLAG"
|
||||
test -d "$OUTDIR/config.tests/arch" || mkdir -p "$OUTDIR/config.tests/arch"
|
||||
cd "$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+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "CONFIG-=app_bundle" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/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" "INCLUDEPATH+=$INCLUDEPATH" "CONFIG-=app_bundle" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
|
||||
|
||||
|
||||
ARCH=""
|
||||
|
4
configure
vendored
4
configure
vendored
@ -4153,7 +4153,7 @@ compileTest()
|
||||
|
||||
# Use config.tests/arch/arch.pro to have the compiler tell us what the target architecture is
|
||||
OUTFILE=$outpath/arch.result
|
||||
"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target"
|
||||
"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target" $I_FLAGS $D_FLAGS $L_FLAGS
|
||||
if [ $? -eq 0 ]; then
|
||||
eval `cat "$OUTFILE"`
|
||||
else
|
||||
@ -4166,7 +4166,7 @@ rm -f "$OUTFILE" 2>/dev/null
|
||||
|
||||
if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
|
||||
# Do the same test again, using the host compiler
|
||||
SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host"
|
||||
SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host" $I_FLAGS $D_FLAGS $L_FLAGS
|
||||
if [ $? -eq 0 ]; then
|
||||
eval `cat "$OUTFILE"`
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user