From 3eca75de67b3fd2c890715b30c7899cebc096fe9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 11 May 2015 18:30:00 +0900 Subject: Make qglobal.h complain if you use -fPIE Prior to Qt 5.4.2 (commit 36d6eb721e7d5997ade75e289d4088dc48678d0d), 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 Reviewed-by: Simon Hausmann --- dist/changes-5.4.2 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'dist/changes-5.4.2') diff --git a/dist/changes-5.4.2 b/dist/changes-5.4.2 index e1ad9b6846..5827187e9e 100644 --- a/dist/changes-5.4.2 +++ b/dist/changes-5.4.2 @@ -34,6 +34,13 @@ information about a particular change. common EXIF-format (big-endian) was not working until 5.4.1. 5.4.2 restores the behavior of 5.4.0 and earlier for most EXIF-tagged JPEGs. EXIF orientation will be an opt-in starting with Qt 5.5. +- 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. **************************************************************************** * Library * -- cgit v1.2.3