The -fPIE option is now accepted when using GCC 4, which means it
is available for backward compatibility for clients using
CMake 2.8.11 or older which makes use of the
POSITION_INDEPENDENT_CODE feature.
Conditionally use that feature for old versions of cmake with
GCC 4. Restore the tests for those versions, and clarify the
situation in the ChangeLog.
Change-Id: I5a06b155dda7db559d86841a2b34fd8ed95acbd0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is a follow-up change to commit 3eca75de67
to mention changes required to CMakeLists.txt for users of Qt.
Change-Id: I1c9ed162427cdc620f998ccf266d59886901c28d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Prior to Qt 5.4.2 (commit 36d6eb721e), we
allowed it, but now we need to enforce that it is not used. Note that
-fPIE does define __PIC__, so we need this to catch the use of -fPIE.
[ChangeLog][Important Behavior Changes] On x86 and x86-64 systems with
ELF binaries (especially Linux), due to a new optimization in GCC 5.x in
combination with a recent version of GNU binutils, compiling Qt
applications with -fPIE is no longer enough. Applications now need to be
compiled with the -fPIC option if Qt's option "reduce relocations" is
active. Note that Clang is known to generate incompatible code even with
-fPIC if the -flto option is active.
Task-number: QTBUG-45755
Change-Id: I66a35ce5f88941f29aa6ffff13dd210e0aa2728f
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Change-Id: I27eaacb532114dd188c4ffff13d6c95e1026b99d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>