Compare commits
No commits in common. "a76a2464f74cfc55b776ef53ae4e719e983744d2" and "9df87e1924bdd445d6669007d9a2ab6bec8f7cd1" have entirely different histories.
a76a2464f7
...
9df87e1924
@ -1,157 +0,0 @@
|
|||||||
From 19765b9cec7811627262166c209bf919ed35e028 Mon Sep 17 00:00:00 2001
|
|
||||||
From: root <root@localhost.localdomain>
|
|
||||||
Date: Thu, 16 Mar 2023 11:20:56 +0800
|
|
||||||
Subject: [PATCH] add sw_64 support
|
|
||||||
|
|
||||||
---
|
|
||||||
.../JavaScriptCore/assembler/AbstractMacroAssembler.h | 6 +++---
|
|
||||||
.../javascriptcore/JavaScriptCore/jit/JITInlineMethods.h | 4 ++--
|
|
||||||
.../javascriptcore/JavaScriptCore/runtime/Collector.cpp | 7 +++++++
|
|
||||||
src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h | 7 ++++++-
|
|
||||||
.../javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp | 6 +++---
|
|
||||||
5 files changed, 21 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/assembler/AbstractMacroAssembler.h b/src/3rdparty/javascriptcore/JavaScriptCore/assembler/AbstractMacroAssembler.h
|
|
||||||
index 198e8d1..6712dc4 100644
|
|
||||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/assembler/AbstractMacroAssembler.h
|
|
||||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/assembler/AbstractMacroAssembler.h
|
|
||||||
@@ -173,7 +173,7 @@ public:
|
|
||||||
struct Imm32 {
|
|
||||||
explicit Imm32(int32_t value)
|
|
||||||
: m_value(value)
|
|
||||||
-#if CPU(ARM)
|
|
||||||
+#if CPU(ARM) || CPU(SW_64)
|
|
||||||
, m_isPointer(false)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
@@ -182,7 +182,7 @@ public:
|
|
||||||
#if !CPU(X86_64)
|
|
||||||
explicit Imm32(ImmPtr ptr)
|
|
||||||
: m_value(ptr.asIntptr())
|
|
||||||
-#if CPU(ARM)
|
|
||||||
+#if CPU(ARM) || CPU(SW_64)
|
|
||||||
, m_isPointer(true)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
@@ -190,7 +190,7 @@ public:
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int32_t m_value;
|
|
||||||
-#if CPU(ARM)
|
|
||||||
+#if CPU(ARM) || CPU(SW_64)
|
|
||||||
// We rely on being able to regenerate code to recover exception handling
|
|
||||||
// information. Since ARMv7 supports 16-bit immediates there is a danger
|
|
||||||
// that if pointer values change the layout of the generated code will change.
|
|
||||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITInlineMethods.h b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITInlineMethods.h
|
|
||||||
index 5af7565..ceef722 100644
|
|
||||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITInlineMethods.h
|
|
||||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITInlineMethods.h
|
|
||||||
@@ -144,7 +144,7 @@ ALWAYS_INLINE void JIT::endUninterruptedSequence(int insnSpace, int constSpace)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if CPU(ARM)
|
|
||||||
+#if CPU(ARM) || CPU(SW_64)
|
|
||||||
|
|
||||||
ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg)
|
|
||||||
{
|
|
||||||
@@ -197,7 +197,7 @@ ALWAYS_INLINE void JIT::restoreArgumentReferenceForTrampoline()
|
|
||||||
#if CPU(X86)
|
|
||||||
// Within a trampoline the return address will be on the stack at this point.
|
|
||||||
addPtr(Imm32(sizeof(void*)), stackPointerRegister, firstArgumentRegister);
|
|
||||||
-#elif CPU(ARM)
|
|
||||||
+#elif CPU(ARM) || CPU(SW_64)
|
|
||||||
move(stackPointerRegister, firstArgumentRegister);
|
|
||||||
#endif
|
|
||||||
// In the trampoline on x86-64, the first argument register is not overwritten.
|
|
||||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
|
|
||||||
index e8f78ee..a032bfb 100644
|
|
||||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
|
|
||||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
|
|
||||||
@@ -894,6 +894,8 @@ typedef ppc_thread_state_t PlatformThreadRegisters;
|
|
||||||
typedef ppc_thread_state64_t PlatformThreadRegisters;
|
|
||||||
#elif CPU(ARM)
|
|
||||||
typedef arm_thread_state_t PlatformThreadRegisters;
|
|
||||||
+#elif CPU(SW_64)
|
|
||||||
+typedef arm_thread_state_t PlatformThreadRegisters;
|
|
||||||
#else
|
|
||||||
#error Unknown Architecture
|
|
||||||
#endif
|
|
||||||
@@ -923,6 +925,9 @@ static size_t getPlatformThreadRegisters(const PlatformThread& platformThread, P
|
|
||||||
#elif CPU(ARM)
|
|
||||||
unsigned user_count = ARM_THREAD_STATE_COUNT;
|
|
||||||
thread_state_flavor_t flavor = ARM_THREAD_STATE;
|
|
||||||
+#elif CPU(SW_64)
|
|
||||||
+ unsigned user_count = ARM_THREAD_STATE_COUNT;
|
|
||||||
+ thread_state_flavor_t flavor = ARM_THREAD_STATE;
|
|
||||||
#else
|
|
||||||
#error Unknown Architecture
|
|
||||||
#endif
|
|
||||||
@@ -959,6 +964,8 @@ static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs)
|
|
||||||
return reinterpret_cast<void*>(regs.__r1);
|
|
||||||
#elif CPU(ARM)
|
|
||||||
return reinterpret_cast<void*>(regs.__sp);
|
|
||||||
+#elif CPU(SW_64)
|
|
||||||
+ return reinterpret_cast<void*>(regs.__sp);
|
|
||||||
#else
|
|
||||||
#error Unknown Architecture
|
|
||||||
#endif
|
|
||||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
|
|
||||||
index 108adfc..5679ee4 100644
|
|
||||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
|
|
||||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
|
|
||||||
@@ -263,6 +263,11 @@
|
|
||||||
#define WTF_CPU_AIX64 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+/* CPU(sw_64) - sw_64 */
|
|
||||||
+#if defined(__sw_64__)
|
|
||||||
+#define WTF_CPU_SW_64 1
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* CPU(AARCH64) - AArch64 */
|
|
||||||
#if defined(__aarch64__) || defined(_M_ARM64)
|
|
||||||
#define WTF_CPU_AARCH64 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(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64) || CPU(RISCV64) || CPU(SW_64)
|
|
||||||
#define WTF_USE_JSVALUE64 1
|
|
||||||
#elif CPU(ARM) || CPU(PPC64) || CPU(RISCV32) || CPU(S390X)
|
|
||||||
#define WTF_USE_JSVALUE32 1
|
|
||||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp
|
|
||||||
index 1015923..031460d 100644
|
|
||||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp
|
|
||||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp
|
|
||||||
@@ -44,7 +44,7 @@ namespace JSC { namespace Yarr {
|
|
||||||
class RegexGenerator : private MacroAssembler {
|
|
||||||
friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);
|
|
||||||
|
|
||||||
-#if CPU(ARM)
|
|
||||||
+#if CPU(ARM) || CPU(SW_64)
|
|
||||||
static const RegisterID input = ARMRegisters::r0;
|
|
||||||
static const RegisterID index = ARMRegisters::r1;
|
|
||||||
static const RegisterID length = ARMRegisters::r2;
|
|
||||||
@@ -1308,7 +1308,7 @@ class RegexGenerator : private MacroAssembler {
|
|
||||||
#else
|
|
||||||
loadPtr(Address(X86Registers::ebp, 2 * sizeof(void*)), output);
|
|
||||||
#endif
|
|
||||||
-#elif CPU(ARM)
|
|
||||||
+#elif CPU(ARM) || CPU(SW_64)
|
|
||||||
push(ARMRegisters::r4);
|
|
||||||
push(ARMRegisters::r5);
|
|
||||||
push(ARMRegisters::r6);
|
|
||||||
@@ -1329,7 +1329,7 @@ class RegexGenerator : private MacroAssembler {
|
|
||||||
pop(X86Registers::edi);
|
|
||||||
pop(X86Registers::ebx);
|
|
||||||
pop(X86Registers::ebp);
|
|
||||||
-#elif CPU(ARM)
|
|
||||||
+#elif CPU(ARM) || CPU(SW_64)
|
|
||||||
#if CPU(ARM_TRADITIONAL)
|
|
||||||
pop(ARMRegisters::r8); // scratch register
|
|
||||||
#endif
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,130 +0,0 @@
|
|||||||
%if !0%{?bootstrap}
|
|
||||||
%ifnarch %{arm}
|
|
||||||
%global tests 1
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%ifarch loongarch64
|
|
||||||
%define debug_package %{nil}
|
|
||||||
%endif
|
|
||||||
%global qt_module qtscript
|
|
||||||
|
|
||||||
Name: qt5-%{qt_module}
|
|
||||||
Version: 5.15.2
|
|
||||||
Release: 2
|
|
||||||
Summary: QtScript component for qt5
|
|
||||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
|
||||||
Url: http://www.qt.io
|
|
||||||
|
|
||||||
%global major_minor %(echo %{version} | cut -d. -f1-2)
|
|
||||||
Source0: https://download.qt.io/official_releases/qt/%{major_minor}/%{version}/submodules/%{qt_module}-everywhere-src-%{version}.tar.xz
|
|
||||||
|
|
||||||
Patch0: qtscript-everywhere-src-5.12.1-s390.patch
|
|
||||||
Patch3001: 3001-add-sw_64-support.patch
|
|
||||||
|
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: gcc-c++
|
|
||||||
BuildRequires: qt5-qtbase-devel qt5-qtbase-private-devel
|
|
||||||
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
|
|
||||||
|
|
||||||
%if ! 0%{?bootstrap}
|
|
||||||
BuildRequires: pkgconfig(Qt5UiTools)
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?tests}
|
|
||||||
BuildRequires: dbus-x11 mesa-dri-drivers time xorg-x11-server-Xvfb
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package devel
|
|
||||||
Summary: Development files for %{name}
|
|
||||||
Provides: %{name}-private-devel = %{version}-%{release}
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
Requires: qt5-qtbase-devel%{?_isa}
|
|
||||||
|
|
||||||
%package help
|
|
||||||
Summary: Programming examples for %{name}
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
|
||||||
This package provides support for qt5 application scripting with ECMAScript
|
|
||||||
|
|
||||||
%description devel
|
|
||||||
Development files for qt5-qtscript
|
|
||||||
|
|
||||||
%description help
|
|
||||||
Examples files for %{name}
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup -n %{qt_module}-everywhere-src-%{version} -p1
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
%ifarch loongarch64
|
|
||||||
export CXXFLAGS="${CXXFLAGS} -fpermissive"
|
|
||||||
%endif
|
|
||||||
%qmake_qt5
|
|
||||||
%make_build
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
%make_install INSTALL_ROOT=%{buildroot}
|
|
||||||
sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" -e "/^QMAKE_PRL_LIBS/d" %{buildroot}%{_qt5_libdir}/*.prl
|
|
||||||
rm -fv %{buildroot}%{_qt5_libdir}/lib*.la
|
|
||||||
|
|
||||||
%check
|
|
||||||
%if 0%{?tests}
|
|
||||||
export CTEST_OUTPUT_ON_FAILURE=1
|
|
||||||
export PATH=%{buildroot}%{_qt5_bindir}:$PATH
|
|
||||||
export LD_LIBRARY_PATH=%{buildroot}%{_qt5_libdir}
|
|
||||||
%make_build -k sub-tests-all ||:
|
|
||||||
timeout 180 \
|
|
||||||
xvfb-run -a \
|
|
||||||
time \
|
|
||||||
%make_build check -k -C tests ||:
|
|
||||||
if [ "$?" -eq "124" ]; then
|
|
||||||
echo 'make check timeout reached!'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license LICENSE.LGPL*
|
|
||||||
%{_qt5_libdir}/libQt5Script.so.5*
|
|
||||||
%{_qt5_libdir}/libQt5ScriptTools.so.5*
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
%{_qt5_headerdir}/Qt*/
|
|
||||||
%{_qt5_libdir}/libQt5Script.so
|
|
||||||
%{_qt5_libdir}/libQt5Script.prl
|
|
||||||
%{_qt5_libdir}/libQt5ScriptTools.so
|
|
||||||
%{_qt5_libdir}/libQt5ScriptTools.prl
|
|
||||||
|
|
||||||
%dir %{_qt5_libdir}/cmake/Qt5Script/
|
|
||||||
%{_qt5_libdir}/cmake/Qt5Script/Qt5ScriptConfig*.cmake
|
|
||||||
|
|
||||||
%dir %{_qt5_libdir}/cmake/Qt5ScriptTools/
|
|
||||||
%{_qt5_libdir}/cmake/Qt5ScriptTools/Qt5ScriptToolsConfig*.cmake
|
|
||||||
%{_qt5_libdir}/pkgconfig/Qt5*.pc
|
|
||||||
%{_qt5_archdatadir}/mkspecs/modules/*.pri
|
|
||||||
|
|
||||||
%files help
|
|
||||||
%{_qt5_examplesdir}/
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Sat Aug 12 2023 panchenbo <panchenbo@kylinsec.com.cn> - 5.15.2-2
|
|
||||||
- add loongarch64 and sw_64 support
|
|
||||||
|
|
||||||
* Wed Oct 13 2021 peijiankang <peijiankang@kylinos.cn> - 5.15.2-1
|
|
||||||
- update to upstream version 5.15.2
|
|
||||||
|
|
||||||
* Mon Sep 14 2020 liuweibo <liuweibo10@huawei.com> - 5.11.1-5
|
|
||||||
- Fix Source0
|
|
||||||
|
|
||||||
* Fri Feb 14 2020 lingsheng <lingsheng@huawei.com> - 5.11.1-4
|
|
||||||
- Package init
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: git
|
|
||||||
src_repo: https://code.qt.io/qt/qtscript.git
|
|
||||||
tag_prefix: "^v"
|
|
||||||
separator: "."
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
diff -up qtscript-everywhere-src-5.12.1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.s390 qtscript-everywhere-src-5.12.1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
|
|
||||||
--- qtscript-everywhere-src-5.12.1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.s390 2019-01-09 06:59:11.000000000 -0600
|
|
||||||
+++ qtscript-everywhere-src-5.12.1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2019-02-15 08:57:27.684231337 -0600
|
|
||||||
@@ -226,6 +226,18 @@
|
|
||||||
#define WTF_CPU_SPARC 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+/* CPU(S390X) - S390 64-bit */
|
|
||||||
+#if defined(__s390x__)
|
|
||||||
+#define WTF_CPU_S390X 1
|
|
||||||
+#define WTF_CPU_BIG_ENDIAN 1
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/* CPU(S390) - S390 32-bit */
|
|
||||||
+#if defined(__s390__) && !defined(__s390x__)
|
|
||||||
+#define WTF_CPU_S390 1
|
|
||||||
+#define WTF_CPU_BIG_ENDIAN 1
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* CPU(X86) - i386 / x86 32-bit */
|
|
||||||
#if defined(__i386__) \
|
|
||||||
|| defined(i386) \
|
|
||||||
@@ -960,7 +972,7 @@
|
|
||||||
#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)
|
|
||||||
#define WTF_USE_JSVALUE64 1
|
|
||||||
-#elif CPU(ARM) || CPU(PPC64) || CPU(RISCV32)
|
|
||||||
+#elif CPU(ARM) || CPU(PPC64) || CPU(RISCV32) || CPU(S390X)
|
|
||||||
#define WTF_USE_JSVALUE32 1
|
|
||||||
#elif OS(WINDOWS) && COMPILER(MINGW)
|
|
||||||
/* Using JSVALUE32_64 causes padding/alignement issues for JITStubArg
|
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user