Commit 3eca75de authored by Thiago Macieira's avatar Thiago Macieira Committed by Simon Hausmann
Browse files

Make qglobal.h complain if you use -fPIE

Prior to Qt 5.4.2 (commit 36d6eb72

), 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: default avatarDmitry Shachnev <mitya57@gmail.com>
Reviewed-by: default avatarSimon Hausmann <simon.hausmann@theqtcompany.com>
parent 3a726628
Showing with 9 additions and 2 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment