From aa40e374acb4415a14c5c177821debcd60a3b99c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 14 Jan 2019 17:48:04 +0100 Subject: [PATCH] test/cfg/runtests.sh: Qt test: Fix syntax check when "-fPIC" is required (#1600) On linux systems (like travis) Qt often seems to be built with the option "reduce_relocations" which requires an application using it to specify the option "-fPIC". --- test/cfg/runtests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/cfg/runtests.sh b/test/cfg/runtests.sh index ab9e19050..21dd1b0dc 100755 --- a/test/cfg/runtests.sh +++ b/test/cfg/runtests.sh @@ -42,6 +42,8 @@ else QTCONFIG_RETURNCODE=$? set -e if [ $QTCONFIG_RETURNCODE -eq 0 ]; then + QTBUILDCONFIG=$(pkg-config --variable=qt_config Qt5Core) + [[ $QTBUILDCONFIG =~ (^|[[:space:]])reduce_relocations($|[[:space:]]) ]] && QTCONFIG="${QTCONFIG} -fPIC" set +e echo -e "#include " | ${CXX} ${CXX_OPT} ${QTCONFIG} -x c++ - QTCHECK_RETURNCODE=$?