From 743682fb7032bd1e4e479dc36f91c658a03cf86d Mon Sep 17 00:00:00 2001 From: root Date: Wed, 5 Jun 2024 18:15:11 +0800 Subject: [PATCH] add sw arch --- 0001-qtbase-add-sw.patch | 116 +++++++++++++++++++++++++++++++++++++++ qt5-qtbase.spec | 7 ++- 2 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 0001-qtbase-add-sw.patch diff --git a/0001-qtbase-add-sw.patch b/0001-qtbase-add-sw.patch new file mode 100644 index 0000000..fa6c951 --- /dev/null +++ b/0001-qtbase-add-sw.patch @@ -0,0 +1,116 @@ +diff -uNar qtbase-everywhere-src-5.15.3/src/3rdparty/double-conversion/include/double-conversion/utils.h qtbase-everywhere-src-5.15.3.new/src/3rdparty/double-conversion/include/double-conversion/utils.h +--- qtbase-everywhere-src-5.15.3/src/3rdparty/double-conversion/include/double-conversion/utils.h 2024-05-22 23:20:44.414888915 +0800 ++++ qtbase-everywhere-src-5.15.3.new/src/3rdparty/double-conversion/include/double-conversion/utils.h 2024-05-22 23:16:22.467905747 +0800 +@@ -100,7 +100,7 @@ + defined(__SH4__) || defined(__alpha__) || \ + defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\ + defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ +- defined(__riscv) || \ ++ defined(__riscv) || defined(__sw_64) || \ + defined(__or1k__) || defined(__arc__) || \ + defined(__EMSCRIPTEN__) || \ + defined(__loongarch__) || defined(__loongarch64__) +diff -uNar qtbase-everywhere-src-5.15.3/src/3rdparty/forkfd/forkfd_linux.c qtbase-everywhere-src-5.15.3.new/src/3rdparty/forkfd/forkfd_linux.c +--- qtbase-everywhere-src-5.15.3/src/3rdparty/forkfd/forkfd_linux.c 2021-03-18 23:29:29.000000000 +0800 ++++ qtbase-everywhere-src-5.15.3.new/src/3rdparty/forkfd/forkfd_linux.c 2024-05-22 22:36:18.767060208 +0800 +@@ -82,7 +82,8 @@ + return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid); + #elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \ + defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \ +- defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) ++ defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || \ ++ defined(__sw_64__) + /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures, + * but since both values are 0, there's no harm. */ + return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls); +diff -uNar qtbase-everywhere-src-5.15.3/src/corelib/global/qglobal.cpp qtbase-everywhere-src-5.15.3.new/src/corelib/global/qglobal.cpp +--- qtbase-everywhere-src-5.15.3/src/corelib/global/qglobal.cpp 2021-03-18 23:29:29.000000000 +0800 ++++ qtbase-everywhere-src-5.15.3.new/src/corelib/global/qglobal.cpp 2024-05-22 20:53:09.449457930 +0800 +@@ -1959,6 +1959,18 @@ + */ + + /*! ++ \macro Q_PROCESSOR_SW_64 ++ \relates ++ \since 5.13 ++ ++ Defined if the application is compiled for 64-bit SW processors. The \l ++ Q_PROCESSOR_SW_64 macro is also defined when Q_PROCESSOR_SW_64 is ++ defined. ++ ++ \sa QSysInfo::buildCpuArchitecture() ++*/ ++ ++/*! + \macro Q_PROCESSOR_S390 + \relates + +diff -uNar qtbase-everywhere-src-5.15.3/src/corelib/io/qfilesystemwatcher_inotify.cpp qtbase-everywhere-src-5.15.3.new/src/corelib/io/qfilesystemwatcher_inotify.cpp +--- qtbase-everywhere-src-5.15.3/src/corelib/io/qfilesystemwatcher_inotify.cpp 2024-05-22 23:20:44.015888940 +0800 ++++ qtbase-everywhere-src-5.15.3.new/src/corelib/io/qfilesystemwatcher_inotify.cpp 2024-05-22 22:37:32.169055491 +0800 +@@ -95,6 +95,10 @@ + # define __NR_inotify_init 444 + # define __NR_inotify_add_watch 445 + # define __NR_inotify_rm_watch 446 ++#elif defined (__sw_64__) ++# define __NR_inotify_init 444 ++# define __NR_inotify_add_watch 445 ++# define __NR_inotify_rm_watch 446 + // no inotify_init1 for the Alpha + #elif defined (__sparc__) || defined (__sparc64__) + # define __NR_inotify_init 151 +diff -uNar qtbase-everywhere-src-5.15.3/src/testlib/3rdparty/cycle_p.h qtbase-everywhere-src-5.15.3.new/src/testlib/3rdparty/cycle_p.h +--- qtbase-everywhere-src-5.15.3/src/testlib/3rdparty/cycle_p.h 2021-03-18 23:29:29.000000000 +0800 ++++ qtbase-everywhere-src-5.15.3.new/src/testlib/3rdparty/cycle_p.h 2024-05-22 22:39:41.711047167 +0800 +@@ -426,6 +426,26 @@ + #endif + + /*----------------------------------------------------------------*/ ++#if defined(__GNUC__) && defined(__sw_64__) && !defined(HAVE_TICK_COUNTER) ++/* ++ * The 32-bit cycle counter on sw_64 overflows pretty quickly, ++ * unfortunately. A 1GHz machine overflows in 4 seconds. ++ */ ++typedef unsigned int CycleCounterTicks; ++ ++static __inline__ CycleCounterTicks getticks(void) ++{ ++ unsigned long cc; ++ __asm__ __volatile__ ("rtc %0" : "=r"(cc)); ++ return (cc & 0xFFFFFFFF); ++} ++ ++INLINE_ELAPSED(__inline__) ++ ++#define HAVE_TICK_COUNTER ++#endif ++ ++/*----------------------------------------------------------------*/ + #if defined(__GNUC__) && defined(__sparc_v9__) && !defined(HAVE_TICK_COUNTER) + typedef unsigned long CycleCounterTicks; + +@@ -457,6 +477,24 @@ + + #define HAVE_TICK_COUNTER + #endif ++ ++/*----------------------------------------------------------------*/ ++#if (defined(__DECC) || defined(__DECCXX)) && defined(__sw_64) && defined(HAVE_C_ASM_H) && !defined(HAVE_TICK_COUNTER) ++# include ++typedef unsigned int CycleCounterTicks; ++ ++static __inline CycleCounterTicks getticks(void) ++{ ++ unsigned long cc; ++ cc = asm("rtc %v0"); ++ return (cc & 0xFFFFFFFF); ++} ++ ++INLINE_ELAPSED(__inline) ++ ++#define HAVE_TICK_COUNTER ++#endif ++ + /*----------------------------------------------------------------*/ + /* SGI/Irix */ + #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE) && !defined(HAVE_TICK_COUNTER) diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index 71eacc7..bb544d4 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 # See http://bugzilla.redhat.com/223663 %global multilib_archs x86_64 %{ix86} %{?mips} ppc64 ppc s390x s390 sparc64 sparcv9 %global multilib_basearchs x86_64 %{?mips64} ppc64 s390x sparc64 @@ -177,6 +177,7 @@ Patch1067: QTBUG-95341-Account-for-the-placeholderText-when-computing-lineRect.p Patch1068: QTBUG-95942-Fix-text-ellipsis-not-implemented-in-Tibetan.patch Patch1070: qt5-qtbase-fix-bug108222-linewrap-carriage_return-different_rowspacing.patch Patch1071: remove-the-X11-True-and-False.patch +Patch1072: 0001-qtbase-add-sw.patch #End # Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. @@ -484,6 +485,7 @@ Qt5 libraries used for drawing widgets and OpenGL items. %patch1068 -p1 %patch1070 -p1 %patch1071 -p1 +%patch1072 -p1 #End # move some bundled libs to ensure they're not accidentally used @@ -1159,6 +1161,9 @@ fi %changelog +* Wed May 30 2024 wxiat - 5.15.3-1.0.2 +- add sw arch + * Mon Dec 12 2022 liuzhilin - 5.15.3-1.0.1 - fix:add support loongarch64 - feature: add patchs for DDE (liuxingwei@uniontech.com) -- Gitee