[arch-commits] Commit in qt5/trunk (3 files)
Evangelos Foutras
foutrelis at archlinux.org
Thu May 21 16:35:17 UTC 2015
Date: Thursday, May 21, 2015 @ 18:35:17
Author: foutrelis
Revision: 239618
upgpkg: qt5 5.4.1-9
Pull two more upstream patches to ensure -fPIC is used when building Qt5 apps.
Added:
qt5/trunk/0001-Make-qglobal.h-complain-if-you-use-fPIE.patch
qt5/trunk/0001-Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch
Modified:
qt5/trunk/PKGBUILD
------------------------------------------------------------+
0001-Make-qglobal.h-complain-if-you-use-fPIE.patch | 44 +++++++++++
0001-Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch | 34 ++++++++
PKGBUILD | 8 +-
3 files changed, 85 insertions(+), 1 deletion(-)
Added: 0001-Make-qglobal.h-complain-if-you-use-fPIE.patch
===================================================================
--- 0001-Make-qglobal.h-complain-if-you-use-fPIE.patch (rev 0)
+++ 0001-Make-qglobal.h-complain-if-you-use-fPIE.patch 2015-05-21 16:35:17 UTC (rev 239618)
@@ -0,0 +1,44 @@
+From 3eca75de67b3fd2c890715b30c7899cebc096fe9 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira at intel.com>
+Date: Mon, 11 May 2015 18:30:00 +0900
+Subject: [PATCH] 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 <mitya57 at gmail.com>
+Reviewed-by: Simon Hausmann <simon.hausmann at theqtcompany.com>
+---
+ src/corelib/global/qglobal.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
+index ef84662..4547877 100644
+--- a/src/corelib/global/qglobal.h
++++ b/src/corelib/global/qglobal.h
+@@ -1047,9 +1047,9 @@ Q_CORE_EXPORT int qrand();
+ # define QT_NO_SHAREDMEMORY
+ #endif
+
+-#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && !defined(__PIC__)
++#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && (!defined(__PIC__) || defined(__PIE__))
+ # error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
+- "Compile your code with -fPIC."
++ "Compile your code with -fPIC (-fPIE is not enough)."
+ #endif
+
+ namespace QtPrivate {
+--
+2.4.0
+
Added: 0001-Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch
===================================================================
--- 0001-Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch (rev 0)
+++ 0001-Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch 2015-05-21 16:35:17 UTC (rev 239618)
@@ -0,0 +1,34 @@
+From 083c9269ed73e8771e1dbe10812696b45b7389f3 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos at foutrelis.com>
+Date: Mon, 11 May 2015 12:20:57 +0300
+Subject: [PATCH] Try to ensure that -fPIC is used in CMake builds
+
+In commit 36d6eb721e7d5997ade75e289d4088dc48678d0d the -fPIE switch was
+replaced with -fPIC in an effort to avoid generating copy relocations
+which are incompatible with Qt5 when built with -reduce-relocations.
+
+Task-number: QTBUG-45755
+Change-Id: I59a55ea15052f498104848c5fd867e563ddc2290
+Reviewed-by: Thiago Macieira <thiago.macieira at intel.com>
+---
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
+index 48d5f21..d4abc5f 100644
+--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
++++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
+@@ -70,8 +70,9 @@ set(_qt5_corelib_extra_includes)
+ # Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module
+ # macro to add it.
+ set(Qt5_POSITION_INDEPENDENT_CODE True)
+-set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
+ set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIC\")
++set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
++set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS ${Qt5Core_EXECUTABLE_COMPILE_FLAGS})
+ !!ENDIF
+
+ !!IF !isEmpty(QT_NAMESPACE)
+--
+2.4.0
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-05-21 14:40:32 UTC (rev 239617)
+++ PKGBUILD 2015-05-21 16:35:17 UTC (rev 239618)
@@ -28,7 +28,7 @@
'qt5-x11extras'
'qt5-xmlpatterns')
pkgver=5.4.1
-pkgrel=8
+pkgrel=9
arch=('i686' 'x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL' 'FDL' 'custom')
@@ -44,6 +44,8 @@
source=("http://download.qt-project.org/official_releases/qt/${pkgver%.*}/${pkgver}/single/${_pkgfqn}.tar.xz"
'0001-Revert-Rotate-images-according-to-Exif-orientation.patch'
'0001-Require-fPIC-instead-of-just-fPIE-for-reduce-relocat.patch'
+ '0001-Make-qglobal.h-complain-if-you-use-fPIE.patch'
+ '0001-Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch'
'assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qdbusviewer.desktop' 'glib-2.43.patch'
'qlockfile-deadlock.patch' 'qnam-corruption.patch' 'keypad-shortcuts.patch'
'CVE-2015-0295.patch' 'CVE-2015-1858_1859.patch' 'CVE-2015-1860.patch')
@@ -50,6 +52,8 @@
md5sums=('7afb5f9235d8d42b5b6e832442a32a5d'
'fb1459f325a15b15b18afeac51173a1d'
'ac8fa252868161c676d876b614e24436'
+ '913a5931d33110b8e698bc9ce733075e'
+ 'fb18ddd022422cd42721d6fb2a994e6a'
'b2897dd6a2967bccf8f10e397aafee55'
'76e150b20178d2d43801f7367232e5f7'
'188da8f4c87316e730ebf1c6217bf5a0'
@@ -70,6 +74,8 @@
# https://bugreports.qt.io/browse/QTBUG-45755
(cd qtbase; patch -p1 -i "$srcdir/0001-Require-fPIC-instead-of-just-fPIE-for-reduce-relocat.patch")
+ (cd qtbase; patch -p1 -i "$srcdir/0001-Make-qglobal.h-complain-if-you-use-fPIE.patch")
+ (cd qtbase; patch -p1 -i "$srcdir/0001-Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch")
# for glib 2.43+ https://bugreports.qt.io/browse/QTBUG-44714
(cd qtwebkit; patch -p1 -i "$srcdir/glib-2.43.patch")
More information about the arch-commits
mailing list