From 325e889ca4fe7e25fb8c38ce917965e0112cfe1c Mon Sep 17 00:00:00 2001 From: Hailiang Date: Fri, 24 Oct 2025 09:04:13 +0800 Subject: [PATCH] fix sw_64 QT_ARCH --- fix-sw_64-QT_ARCH.patch | 50 +++++++++++++++++++++++++++++++++++++++++ qt5-qtbase.spec | 6 ++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 fix-sw_64-QT_ARCH.patch diff --git a/fix-sw_64-QT_ARCH.patch b/fix-sw_64-QT_ARCH.patch new file mode 100644 index 0000000..21db4da --- /dev/null +++ b/fix-sw_64-QT_ARCH.patch @@ -0,0 +1,50 @@ +From 797aad7714f38d566e77870f1d1cd35ea6b37e23 Mon Sep 17 00:00:00 2001 +From: mahailiang +Date: Tue, 22 Apr 2025 17:50:12 +0800 +Subject: [PATCH] fix sw_64 QT_ARCH +--- + src/corelib/global/archdetect.cpp | 2 ++ + src/corelib/global/qprocessordetection.h | 15 +++++++++++++-- + 2 files changed, 15 insertions(+), 2 deletions(-) +diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp +index 74f3c8fc..773aecdc 100644 +--- a/src/corelib/global/archdetect.cpp ++++ b/src/corelib/global/archdetect.cpp +@@ -85,6 +85,8 @@ + # define ARCH_PROCESSOR "sparcv9" + #elif defined(Q_PROCESSOR_SPARC) + # define ARCH_PROCESSOR "sparc" ++#elif defined(Q_PROCESSOR_SW_64) ++# define ARCH_PROCESSOR "sw_64" + #else + # define ARCH_PROCESSOR "unknown" + #endif +diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h +index 6f0bc7e7..a3c94af8 100644 +--- a/src/corelib/global/qprocessordetection.h ++++ b/src/corelib/global/qprocessordetection.h +@@ -87,8 +87,19 @@ + // #elif defined(__alpha__) || defined(_M_ALPHA) + // # define Q_PROCESSOR_ALPHA + // Q_BYTE_ORDER not defined, use endianness auto-detection +-//#elif defined(__sw_64__) || defined(_M_SW_64) +-//# define Q_PROCESSOR_SW_64 ++ ++/* ++ SW64 family ++ ++ SW64 is little-endian. ++*/ ++ ++#if defined(__sw_64__) ++# define Q_PROCESSOR_SW_64 ++# define Q_BYTE_ORDER Q_LITTLE_ENDIAN ++# define Q_PROCESSOR_WORDSIZE 8 ++#endif ++ + /* + ARM family, known revisions: V5, V6, V7, V8 + +-- +2.43.0 + diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index aaf0708..c78920a 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -36,7 +36,7 @@ Name: qt5-qtbase Summary: Qt5 - QtBase components Version: 5.15.16 -Release: 1 +Release: 2 # See LGPL_EXCEPTIONS.txt, for exception details License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 @@ -125,6 +125,7 @@ Patch0024: Fix-lupdate-command-error-on-loongarch64.patch Patch0031: CVE-2023-45935.patch Patch0033: add-sw_64-support-for-syscall_fork.patch Patch0034: CVE-2025-30348.patch +Patch0035: fix-sw_64-QT_ARCH.patch # Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. # Those themes are there for platform integration. If the required libraries are @@ -1019,6 +1020,9 @@ fi %changelog +* Fri Oct 24 2025 mahailiang - 5.15.16-2 +- fix sw_64 QT_ARCH + * Mon Apr 07 2025 Funda Wang - 5.15.16-1 - update to verison 5.15.16 -- Gitee