From 51dafeda8c833134acf7da40f7ad58cec349ee30 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 25 Jan 2017 07:22:04 -0800 Subject: 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) --- mkspecs/linux-icc/qmake.conf | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3