summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-05-05 08:43:42 -0700
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-05-07 19:42:43 +0000
commit36d6eb721e7d5997ade75e289d4088dc48678d0d (patch)
tree208215fcc41b726e3f401936724ffbc4e427dbee /tests/auto/tools
parentace86dca159d50886be5bcff7abe72383cad9fde (diff)
Require -fPIC instead of just -fPIE for -reduce-relocations
GCC 5 combined with a recent binutils have a new optimization that allows them to generate copy relocations even in -fPIE code. Clang has the same functionality when compiling an executable with -flto. We need to let the compilers know that they cannot use copy relocations, so they need to use really position-independent code. Position independent code throughout is not really required. We just need the compilers to use position-independent access to symbols coming from the Qt libraries, but there's currently no other way of doing that. Task-number: QTBUG-45755 Change-Id: I0d4913955e3745b69672ffff13db5df7377398c5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index edb6488eaa..748cb82989 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -662,7 +662,7 @@ void tst_Moc::oldStyleCasts()
QStringList args;
args << "-c" << "-x" << "c++" << "-Wold-style-cast" << "-I" << "."
- << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIE" << "-";
+ << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-";
proc.start("gcc", args);
QVERIFY(proc.waitForStarted());
proc.write(mocOut);
@@ -732,7 +732,7 @@ void tst_Moc::inputFileNameWithDotsButNoExtension()
QStringList args;
args << "-c" << "-x" << "c++" << "-I" << ".."
- << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIE" << "-";
+ << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-";
proc.start("gcc", args);
QVERIFY(proc.waitForStarted());
proc.write(mocOut);
@@ -1011,7 +1011,7 @@ void tst_Moc::ignoreOptionClashes()
// If -pthread wasn't ignored, it was parsed as a prefix of "thread/", which breaks compilation.
QStringList gccArgs;
gccArgs << "-c" << "-x" << "c++" << "-I" << ".."
- << "-I" << qtIncludePath << "-I" << includeDir << "-o" << "/dev/null" << "-fPIE" << "-";
+ << "-I" << qtIncludePath << "-I" << includeDir << "-o" << "/dev/null" << "-fPIC" << "-";
proc.start("gcc", gccArgs);
QVERIFY(proc.waitForStarted());
proc.write(mocOut);