summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@rim.com>2012-10-18 16:40:33 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-19 13:02:17 +0200
commit1da978416d89b86d92087e8dc51bdb305b6ed58c (patch)
tree59d66acbc60bad75dfc7d2ea079b6ce5d6d376af /configure
parentb340e40f9185d2f4ec59ce3313447419580fe6ee (diff)
configure: state compiler explicitly when testing for supported flags
... so we can test those functions with host and cross compilers. Change-Id: Ifebfdac54580633c797f77b139514cf9d66edd8c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 5 insertions, 5 deletions
diff --git a/configure b/configure
index 78ae73c2d4..d130b69ef4 100755
--- a/configure
+++ b/configure
@@ -224,28 +224,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
}
# $1: newline-separated list of default paths
@@ -2669,7 +2669,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