summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 8 insertions, 7 deletions
diff --git a/configure b/configure
index 86d456c732..5187e51549 100755
--- a/configure
+++ b/configure
@@ -201,28 +201,28 @@ getXQMakeConf()
getQMakeConf3 "$1" "$xspecvals"
}
-# relies on $TEST_COMPILER being set correctly
compilerSupportsFlag()
{
cat >conftest.cpp <<EOF
int main() { return 0; }
EOF
- $TEST_COMPILER "$@" -o conftest-out.o conftest.cpp
+ "$@" -o conftest-out.o conftest.cpp
ret=$?
rm -f conftest.cpp conftest-out.o
return $ret
}
-# relies on $TEST_COMPILER being set correctly
linkerSupportsFlag()
{
+ compiler=$1
+ shift
lflags=-Wl
for flag
do
safe_flag=`shellEscape "$flag"`
lflags=$lflags,$safe_flag
done
- compilerSupportsFlag "$lflags" >/dev/null 2>&1
+ compilerSupportsFlag $compiler $lflags >/dev/null 2>&1
}
#-------------------------------------------------------------------------------
@@ -3396,7 +3396,7 @@ fi
SYSROOT_FLAG=
if [ -n "$CFG_SYSROOT" ]; then
- if compilerSupportsFlag -c --sysroot="$CFG_SYSROOT"; then
+ if compilerSupportsFlag $TEST_COMPILER -c --sysroot="$CFG_SYSROOT"; then
[ "$OPT_VERBOSE" = "yes" ] && echo "Setting sysroot to: $CFG_SYSROOT"
SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
else
@@ -3484,7 +3484,7 @@ fi
# auto-detect -fstack-protector-strong support (for QNX only currently)
if [ "$XPLATFORM_QNX" = "yes" ]; then
- if compilerSupportsFlag -fstack-protector-strong; then
+ if compilerSupportsFlag $TEST_COMPILER -fstack-protector-strong; then
CFG_STACK_PROTECTOR_STRONG=yes
else
CFG_STACK_PROTECTOR_STRONG=no
@@ -8640,7 +8640,8 @@ QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
EOF
# Ensure we can link to uninistalled libraries
-if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
+QMAKE_COMPILER="`getQMakeConf QMAKE_CXX`"
+if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag "$QMAKE_COMPILER" -rpath-link "$outpath/lib"; then
echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$CACHEFILE.tmp"
fi
if [ -n "$QT_CFLAGS_PSQL" ]; then