summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-01-25 07:22:04 -0800
committerThiago Macieira <thiago.macieira@intel.com>2017-01-26 07:42:45 +0000
commit51dafeda8c833134acf7da40f7ad58cec349ee30 (patch)
treed704a8e71161ce2ff28624788f9b7abe0d92bfd0 /mkspecs
parenta23d705e1899771d546e8c0d30b24ac58363f2ca (diff)
linux-icc: always compile applications as position-independent execs
The problem isn't the compiler, but the linker, so we ought to turn this flag on for all ELF-based systems where we compile Qt with -Bsymbolic, but so far only the Intel compiler has been affected. We can turn it on as needed for other systems. The cause of the problem is the way that ICC materializes the pointer- to-member-function: it stores the full 2*sizeof(void*) data in an anonymous variable, so that it can load it in one go, such as one 16- byte SSE aligned load on 64-bit systems. That relocation in a data variable gets turned into a fixed-position copy relocation by the linker, which breaks the signal-identification mechanism. GCC and Clang are likely to be affected if anyone did: static const auto destroyed = &QObject::destroyed; QObject::connect(obj, destroyed, [](){}); Task-number: QTBUG-52439 Change-Id: I0d69eaf61af149db9574fffd149d0cfb08459c33 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/linux-icc/qmake.conf1
1 files changed, 1 insertions, 0 deletions
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 2c66e80db4..8ca2767061 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -79,6 +79,7 @@ QMAKE_LINK = icpc
QMAKE_LINK_SHLIB = icpc
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_APP = -pie
QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -shared -shared-intel
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB