From 2d26780dd2e24706414ae7739ec1cade299d7f14 Mon Sep 17 00:00:00 2001 From: Hailiang Date: Thu, 6 Mar 2025 14:07:44 +0800 Subject: [PATCH] add sw_64 support (cherry picked from commit 50f497bd001ca3d2f5843424a20ac0b55868e453) --- add-qtscript-support-sw_64.patch | 37 ++++++++++++++++++++++++++++++++ qt5-qtscript.spec | 8 +++++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 add-qtscript-support-sw_64.patch diff --git a/add-qtscript-support-sw_64.patch b/add-qtscript-support-sw_64.patch new file mode 100644 index 0000000..03da71d --- /dev/null +++ b/add-qtscript-support-sw_64.patch @@ -0,0 +1,37 @@ +From 593752efbbb73ebe368ab2d16ec6f53695398bfb Mon Sep 17 00:00:00 2001 +From: root +Date: Sun, 10 Nov 2024 13:43:25 +0800 +Subject: [PATCH] add support sw_64 + +--- + src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +index 108adfc..38d33c1 100644 +--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h ++++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +@@ -156,6 +156,11 @@ + #define WTF_CPU_ALPHA 1 + #endif + ++/* CPU(SW_64) - SW64 */ ++#if defined(__sw_64__) ++#define WTF_CPU_SW_64 1 ++#endif ++ + /* CPU(IA64) - Itanium / IA-64 */ + #if defined(__ia64__) || defined(__ia64) || defined(_M_IA64) + #define WTF_CPU_IA64 1 +@@ -970,7 +975,7 @@ + #endif + + #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64) +-#if (CPU(X86_64) && !CPU(X32) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64) || CPU(RISCV64) ++#if (CPU(X86_64) && !CPU(X32) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(SW_64) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64) || CPU(RISCV64) + #define WTF_USE_JSVALUE64 1 + #elif CPU(ARM) || CPU(PPC64) || CPU(RISCV32) || CPU(S390X) + #define WTF_USE_JSVALUE32 1 +-- +2.33.0 + diff --git a/qt5-qtscript.spec b/qt5-qtscript.spec index 4c1ff5e..b40ca54 100644 --- a/qt5-qtscript.spec +++ b/qt5-qtscript.spec @@ -12,7 +12,7 @@ Name: qt5-%{qt_module} Version: 5.15.10 -Release: 1 +Release: 2 Summary: QtScript component for qt5 License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 Url: http://www.qt.io @@ -24,6 +24,7 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/ # add s390(x0 support to Platform.h (taken from webkit) Patch100: qtscript-everywhere-src-5.12.1-s390.patch +Patch101: add-qtscript-support-sw_64.patch BuildRequires: make BuildRequires: gcc-c++ @@ -65,7 +66,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %build -%ifarch loongarch64 +%ifarch loongarch64 sw_64 export CXXFLAGS="${CXXFLAGS} -fpermissive" %endif %qmake_qt5 @@ -121,6 +122,9 @@ fi %changelog +* Thu Mar 06 2025 mahailiang - 5.15.10-2 +- add sw_64 support + * Mon Aug 21 2023 huayadong - 5.15.10-1 - update to version 5.15.10-1