[qt/f15] Set proper architecture flags for armv7hl and admv7hnl (#744701) fix ARM Thumb2 build (QTBUG-16402)
Rex Dieter
rdieter at fedoraproject.org
Mon Oct 10 15:39:51 UTC 2011
commit 78e2db278cad08223a902f56024374d76f41c706
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Mon Oct 10 10:39:49 2011 -0500
Set proper architecture flags for armv7hl and admv7hnl (#744701)
fix ARM Thumb2 build (QTBUG-16402)
.gitignore | 2 +-
QTBUG-16402-fix-ARM-Thumb2-build.patch | 23 +++++++++++++++++++++++
qt.spec | 25 ++++++++++++++++++++++++-
3 files changed, 48 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 948712c..f617247 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,6 @@
/hi32-phonon-gstreamer.png
/hi48-phonon-gstreamer.png
/hi64-phonon-gstreamer.png
-/qt-everywhere-opensource-src-4.7.3.tar.gz
/qt-everywhere-opensource-src-4.7.4.tar.gz
/qt-everywhere-opensource-src-4.8.0-beta1.tar.gz
+/qt-everywhere-opensource-src-4.8.0-20111002.tar.xz
diff --git a/QTBUG-16402-fix-ARM-Thumb2-build.patch b/QTBUG-16402-fix-ARM-Thumb2-build.patch
new file mode 100644
index 0000000..ac84a25
--- /dev/null
+++ b/QTBUG-16402-fix-ARM-Thumb2-build.patch
@@ -0,0 +1,23 @@
+diff -up qt-everywhere-opensource-src-4.7.4/src/corelib/arch/qatomic_armv6.h.thumb qt-everywhere-opensource-src-4.7.4/src/corelib/arch/qatomic_armv6.h
+--- qt-everywhere-opensource-src-4.7.4/src/corelib/arch/qatomic_armv6.h.thumb 2011-09-17 20:01:15.636182558 +0200
++++ qt-everywhere-opensource-src-4.7.4/src/corelib/arch/qatomic_armv6.h 2011-09-17 20:04:06.752642585 +0200
+@@ -144,6 +144,9 @@ inline bool QBasicAtomicInt::testAndSetO
+ asm volatile("0:\n"
+ "ldrex %[result], [%[_q_value]]\n"
+ "eors %[result], %[result], %[expectedValue]\n"
++#ifdef __thumb__
++ "itt eq\n"
++#endif
+ "strexeq %[result], %[newValue], [%[_q_value]]\n"
+ "teqeq %[result], #1\n"
+ "beq 0b\n"
+@@ -202,6 +205,9 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPoint
+ asm volatile("0:\n"
+ "ldrex %[result], [%[_q_value]]\n"
+ "eors %[result], %[result], %[expectedValue]\n"
++#ifdef __thumb__
++ "itt eq\n"
++#endif
+ "strexeq %[result], %[newValue], [%[_q_value]]\n"
+ "teqeq %[result], #1\n"
+ "beq 0b\n"
diff --git a/qt.spec b/qt.spec
index 45f0ed6..0aadcf1 100644
--- a/qt.spec
+++ b/qt.spec
@@ -18,7 +18,7 @@ Summary: Qt toolkit
Name: qt
Epoch: 1
Version: 4.7.4
-Release: 2%{?dist}
+Release: 3%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT
@@ -94,6 +94,7 @@ Patch64: qt-everywhere-opensource-src-4.7.1-QTBUG-14467.patch
Patch105: qt-everywhere-opensource-src-4.7.1-webkit_debug_javascriptcore.patch
# bz#705348, per-font autohint fontconfig directives globally disable the bytecode interpreter
Patch107: QTBUG-19947-fontconfig-2.patch
+Patch108: QTBUG-16402-fix-ARM-Thumb2-build.patch
# kde-qt git patches
Patch202: 0002-This-patch-makes-override-redirect-windows-popup-men.patch
@@ -529,6 +530,8 @@ Qt libraries used for drawing widgets and OpenGL items.
## upstream patches
%patch105 -p1 -b .webkit_debug_javascriptcore
%patch107 -p1 -b .QTBUG-19947-fontconfig-2
+# Merged in 4.8.
+%patch108 -p1 -b .QTBUG-16402-fix-ARM-Thumb2-build
# kde-qt branch
@@ -590,6 +593,20 @@ done
# add '-importdir %{_qt4_importdir}' when it works, right now fails with:
# %{_qt4_importdir} unknown argument
+# This should go away if/when qt supports ARMv7
+if [ -d src/corelib/arch/armv7/ -o -f src/corelib/arch/qatomic_armv7.h ]; then
+ echo "ERROR: This version of qt supports ARMv7. Please remove -arch armv6 override from spec file"
+ exit 1
+fi
+%ifarch armv7hl armv7hnl
+%define qt_arch -arch armv6
+%endif
+
+# Force explicit neon mode instead of auto detection
+%ifarch armv7hl
+%define qt_neon -no-neon
+%endif
+
# build shared, threaded (default) libraries
./configure -v \
-confirm-license \
@@ -617,6 +634,8 @@ done
-no-rpath \
-reduce-relocations \
-no-separate-debug-info \
+ %{?qt_arch} \
+ %{?qt_neon} \
%{?phonon} %{!?phonon:-no-phonon} \
%{?phonon_backend} \
%{?no_pch} \
@@ -1269,6 +1288,10 @@ fi
%changelog
+* Fri Sep 16 2011 Henrik Nordstrom <henrik at henriknordstrom.net> - 1:4.7.4-3
+- Set proper architecture flags for armv7hl and admv7hnl (#744701)
+- fix ARM Thumb2 build (QTBUG-16402)
+
* Fri Sep 16 2011 Lukas Tinkl <ltinkl at redhat.com> - 1:4.7.4-2
- respun upstream tarball to fix offline HTML docu
(https://bugreports.qt.nokia.com/browse/QTBUG-21454)
More information about the scm-commits
mailing list