path: root/configure
diff options
authorOlivier Goffart <>2012-01-29 13:54:19 +0100
committerQt by Nokia <>2012-02-10 11:42:31 +0100
commit482d96a0c5d523ace63f56bda6851926b4469dd0 (patch)
treeab25f3f91adbd6031f0bb83812b516e80131bff4 /configure
parent09e2e77be25e02ff1c3ba432d739fbc5fe860ec7 (diff)
Force -fPIE on ELF if Qt is built with reduced relocations
Put in qconfig.h whether qt is compiled with reduced relocations. When using -Bsymbolic-functions (enabled by default on Qt) but not -fPIE, the comparison of the function pointers fail because the addresses are different in Qt, and in the executable. Hence we now enable -fPIE by default on qmake, and force a compilation error when it is not enabled and built with reduced relocations. Done-with: Sune Vuorela <> Change-Id: Ib3fdba06fab6e8a93b75b4c6cf16cc973ab335db Reviewed-by: Bradley T. Hughes <> Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'configure')
1 files changed, 5 insertions, 0 deletions
diff --git a/configure b/configure
index a3b94e1eee..d497c2f77c 100755
--- a/configure
+++ b/configure
@@ -7066,6 +7066,11 @@ else
echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/"
+#REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
+if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
+ echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/"
echo "" >>"$outpath/src/corelib/global/"