diff --git a/0001-qt5-qtbase-anolis-add-loongarch.patch b/0001-qt5-qtbase-anolis-add-loongarch.patch new file mode 100644 index 0000000000000000000000000000000000000000..546d5af4bd8e3a293742cd76eab05d30ea52a1a3 --- /dev/null +++ b/0001-qt5-qtbase-anolis-add-loongarch.patch @@ -0,0 +1,48 @@ +diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h +index 7622fe61..ce6e409f 100644 +--- a/src/3rdparty/double-conversion/include/double-conversion/utils.h ++++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h +@@ -94,7 +94,8 @@ int main(int argc, char** argv) { + defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ + defined(__riscv) || \ + defined(__or1k__) || defined(__arc__) || \ +- defined(__EMSCRIPTEN__) ++ defined(__EMSCRIPTEN__) || \ ++ defined(__loongarch__) || defined(__loongarch64__) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(__mc68000__) || \ + defined(__pnacl__) || defined(__native_client__) +diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp +index 66a5e074..e122d16f 100644 +--- a/src/corelib/global/archdetect.cpp ++++ b/src/corelib/global/archdetect.cpp +@@ -59,6 +59,10 @@ + # define ARCH_PROCESSOR "x86_64" + #elif defined(Q_PROCESSOR_IA64) + # define ARCH_PROCESSOR "ia64" ++#elif defined(Q_PROCESSOR_LOONGARCH_64) ++# define ARCH_PROCESSOR "loongarch64" ++#elif defined(Q_PROCESSOR_LOONGARCH) ++# define ARCH_PROCESSOR "loongarch" + #elif defined(Q_PROCESSOR_MIPS_64) + # define ARCH_PROCESSOR "mips64" + #elif defined(Q_PROCESSOR_MIPS) +diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h +index 77b3ba36..58c54b40 100644 +--- a/src/corelib/global/qprocessordetection.h ++++ b/src/corelib/global/qprocessordetection.h +@@ -223,6 +223,14 @@ + # define Q_PROCESSOR_WORDSIZE 8 + // Q_BYTE_ORDER not defined, use endianness auto-detection + ++/* ++*/ ++#elif defined(_loongarch) || defined(__loongarch__) ++# define Q_PROCESSOR_LOONGARCH ++# if defined(__loongarch64) ++# define Q_PROCESSOR_LOONGARCH_64 ++# define Q_PROCESSOR_WORDSIZE 8 ++# endif + /* + MIPS family, known revisions: I, II, III, IV, 32, 64 + diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index e92624c1ea9b253499bddf01099d464862922113..e0b189b706ef08dc43ad72ff8f7ac86e92fa3f82 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # 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 @@ -38,7 +39,7 @@ BuildRequires: pkgconfig(libsystemd) Name: qt5-qtbase Summary: Qt5 - QtBase components Version: 5.15.2 -Release: 4%{?dist} +Release: 4%{anolis_release}%{?dist} # See LGPL_EXCEPTIONS.txt, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -109,6 +110,11 @@ Patch68: qtbase-ambiguous-python-shebang.patch # Security fixes Patch100: qtbase-CVE-2021-38593.patch + +#Add by anolis +Patch1000: 0001-qt5-qtbase-anolis-add-loongarch.patch +#End + # Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. # Those themes are there for platform integration. If the required libraries are # not there, the platform to integrate with isn't either. Then Qt will just @@ -360,6 +366,10 @@ Qt5 libraries used for drawing widgets and OpenGL items. %patch100 -p1 -b .CVE-2021-38593 +#Add by anolis +%patch1000 -p1 +#End + # move some bundled libs to ensure they're not accidentally used pushd src/3rdparty mkdir UNUSED @@ -1025,6 +1035,9 @@ fi %changelog +* Mon Apr 18 2022 liuzhilin - 5.15.2-4.0.1 +- fix:add support loongarch64 + * Tue Oct 12 2021 Jan Grulich - 5.15.2-4 - Fix out-of-bounds write in QOutlineMapper::convertPath Resolves: bz#1996877