[qt5-qtscript] add s390(x) support

Dan Horák sharkcz at fedoraproject.org
Mon Nov 25 13:34:13 UTC 2013


commit 4ad1ef157a3d2e4ed66be5cff6f2566afd777cb7
Author: Dan Horák <dan at danny.cz>
Date:   Mon Nov 25 14:33:39 2013 +0100

    add s390(x) support

 qt5-qtscript.spec                              |    3 ++
 qtscript-opensource-src-5.2.0-alpha-s390.patch |   31 ++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/qt5-qtscript.spec b/qt5-qtscript.spec
index 9e2f629..32706ba 100644
--- a/qt5-qtscript.spec
+++ b/qt5-qtscript.spec
@@ -19,6 +19,8 @@ Source0: http://download.qt-project.org/development_releases/qt/5.2/%{version}-%
 %else
 Source0: http://download.qt-project.org/official_releases/qt/5.2/%{version}/submodules/%{qt_module}-opensource-src-%{version}.tar.xz
 %endif
+# add s390(x0 support to Platform.h (taken from webkit)
+Patch0:  qtscript-opensource-src-5.2.0-alpha-s390.patch
 
 BuildRequires: qt5-qtbase-devel >= %{version}
 
@@ -48,6 +50,7 @@ BuildArch: noarch
 
 %prep
 %setup -q -n %{qt_module}-opensource-src-%{version}%{?pre:-%{pre}}
+%patch0 -p1 -b .s390
 
 
 %build
diff --git a/qtscript-opensource-src-5.2.0-alpha-s390.patch b/qtscript-opensource-src-5.2.0-alpha-s390.patch
new file mode 100644
index 0000000..7507b48
--- /dev/null
+++ b/qtscript-opensource-src-5.2.0-alpha-s390.patch
@@ -0,0 +1,31 @@
+diff -up qtscript-opensource-src-5.2.0-alpha/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.s390 qtscript-opensource-src-5.2.0-alpha/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
+--- qtscript-opensource-src-5.2.0-alpha/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.s390	2013-11-25 10:57:19.094713069 -0500
++++ qtscript-opensource-src-5.2.0-alpha/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h	2013-11-25 11:02:20.624715931 -0500
+@@ -189,6 +189,18 @@
+ #define WTF_CPU_SPARC 1
+ #endif
+ 
++/* CPU(S390X) - S390 64-bit */
++#if defined(__s390x__)
++#define WTF_CPU_S390X 1
++#define WTF_CPU_BIG_ENDIAN 1
++#endif
++
++/* CPU(S390) - S390 32-bit */
++#if defined(__s390__) && !defined(__s390x__)
++#define WTF_CPU_S390 1
++#define WTF_CPU_BIG_ENDIAN 1
++#endif
++
+ /* CPU(X86) - i386 / x86 32-bit */
+ #if   defined(__i386__) \
+     || defined(i386)     \
+@@ -878,7 +890,7 @@
+ #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
+ #if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64)
+ #define WTF_USE_JSVALUE64 1
+-#elif CPU(ARM) || CPU(PPC64)
++#elif CPU(ARM) || CPU(PPC64) || CPU(S390X)
+ #define WTF_USE_JSVALUE32 1
+ #elif OS(WINDOWS) && COMPILER(MINGW)
+ /* Using JSVALUE32_64 causes padding/alignement issues for JITStubArg


More information about the scm-commits mailing list