From 83b5c4320353be52d8996ba86c33db85a6b94151 Mon Sep 17 00:00:00 2001 From: dpd Date: Tue, 28 Apr 2026 16:41:24 +0800 Subject: [PATCH] fix build error for loongarch64 --- ...-failure-on-loongarch64-architecture.patch | 25 +++++++++++++++++++ qt.spec | 18 ++++++++++--- 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 0001-Fix-build-failure-on-loongarch64-architecture.patch diff --git a/0001-Fix-build-failure-on-loongarch64-architecture.patch b/0001-Fix-build-failure-on-loongarch64-architecture.patch new file mode 100644 index 0000000..b2e530e --- /dev/null +++ b/0001-Fix-build-failure-on-loongarch64-architecture.patch @@ -0,0 +1,25 @@ +From b9e06fd2fdb4d2a154a7dcdae6c907349b757835 Mon Sep 17 00:00:00 2001 +From: doupengda +Date: Tue, 28 Apr 2026 15:57:15 +0800 +Subject: [PATCH] Fix build failure on loongarch64 architecture + +--- + .../webkit/Source/JavaScriptCore/runtime/JSGlobalData.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSGlobalData.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSGlobalData.cpp +index 8ddb7d26..155f0e8d 100644 +--- a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSGlobalData.cpp ++++ b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSGlobalData.cpp +@@ -121,7 +121,7 @@ void JSGlobalData::storeVPtrs() + { + // Enough storage to fit a JSArray, JSByteArray, JSString, or JSFunction. + // COMPILE_ASSERTS below check that this is true. +- char storage[64]; ++ char storage[256]; + + COMPILE_ASSERT(sizeof(JSArray) <= sizeof(storage), sizeof_JSArray_must_be_less_than_storage); + JSCell* jsArray = new (storage) JSArray(JSArray::VPtrStealingHack); +-- +2.43.7 + diff --git a/qt.spec b/qt.spec index f96cfbb..2a0c777 100644 --- a/qt.spec +++ b/qt.spec @@ -26,7 +26,7 @@ Summary: Qt toolkit Name: qt Version: 4.8.7 -Release: 2%{?dist} +Release: 3%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT Url: http://qt-project.org/ @@ -151,6 +151,7 @@ Patch503: qt-everywhere-opensource-src-4.8.5-CVE-2020-24741.patch Patch504: qt-CVE-2023-32573.patch Patch505: qt-CVE-2023-34410.patch +Patch506: 0001-Fix-build-failure-on-loongarch64-architecture.patch Source20: assistant.desktop Source21: designer.desktop @@ -349,7 +350,13 @@ Provides: %{name}-static = %{version}-%{release} Provides: qt4-static = %{version}-%{release} Provides: qt4-devel = %{version}-%{release} %{?_isa:Provides: qt4-devel = %{version}-%{release}} + +%if "%{dist}" == ".oc9" || "%{dist}" == ".ocs23" Requires: opencloudos-rpm-config +%else +Requires: tencentos-rpm-config +%endif + %description devel This package contains the files necessary to develop applications using the Qt toolkit. Includes: @@ -503,6 +510,7 @@ rm -rf src/3rdparty/clucene %patch -P503 -p1 -b .CVE-2020-24741 %patch -P504 -p1 -b .CVE-2023-32573 %patch -P505 -p1 -b .CVE-2023-34410 +%patch -P506 -p1 -b .loongarch64 %patch -P84 -p1 -b .QTBUG-35459 @@ -514,7 +522,7 @@ rm -rf src/3rdparty/clucene %define platform linux-g++-64 %endif -%ifarch x86_64 aarch64 +%ifarch x86_64 aarch64 loongarch64 %define platform linux-g++ %endif @@ -559,7 +567,7 @@ CXXFLAGS="$CXXFLAGS -Wno-deprecated" export QTDIR=$PWD export PATH=$PWD/bin:$PATH export LD_LIBRARY_PATH=$PWD/lib/ -export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS" +export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS -fpermissive" export CFLAGS="$CFLAGS $RPM_OPT_FLAGS" export LDFLAGS="$LDFLAGS $RPM_LD_FLAGS" export MAKEFLAGS="%{?_smp_mflags}" @@ -1155,6 +1163,10 @@ fi %changelog +* Tue Apr 28 2026 doupengda - 4.8.7-3 +- [Type] sync +- [DESC] fix build error for loongarch64 + * Thu Jun 12 2025 bbrucezhang - 4.8.7-2 - Rebuilt for loongarch64 -- Gitee