Add support for loongarch64 and fix patch missing problem
This commit is contained in:
parent
e93344988d
commit
6a2367848f
70
physx-loongarch64.patch
Normal file
70
physx-loongarch64.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
diff -Naur qtquick3dphysics-everywhere-src-6.5.2/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h qtquick3dphysics-everywhere-src-6.5.2-change/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h
|
||||||
|
--- qtquick3dphysics-everywhere-src-6.5.2/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h 2024-06-27 16:11:54.523604123 +0800
|
||||||
|
+++ qtquick3dphysics-everywhere-src-6.5.2-change/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h 2024-06-27 16:07:34.811096872 +0800
|
||||||
|
@@ -129,6 +129,8 @@
|
||||||
|
#define PX_X64 1
|
||||||
|
#elif defined(__riscv) && __riscv_xlen == 64
|
||||||
|
#define PX_RV64 1
|
||||||
|
+#elif defined(__loongarch__) && __loongarch_grlen == 64
|
||||||
|
+#define PX_LN64 1
|
||||||
|
#else
|
||||||
|
#error "Unknown architecture"
|
||||||
|
#endif
|
||||||
|
@@ -149,7 +151,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Disable SIMD for webassembly, mips and arm64 */
|
||||||
|
-#if defined(__EMSCRIPTEN__) || defined(__mips__) || defined(_M_ARM64) || defined(_M_ARM) || defined(__riscv)
|
||||||
|
+#if defined(__EMSCRIPTEN__) || defined(__mips__) || defined(_M_ARM64) || defined(_M_ARM) || defined(__riscv) || defined(__loongarch__)
|
||||||
|
#define PX_SIMD_DISABLED 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -264,7 +266,7 @@
|
||||||
|
// architecture
|
||||||
|
#define PX_INTEL_FAMILY (PX_X64 || PX_X86)
|
||||||
|
#define PX_ARM_FAMILY (PX_ARM || PX_A64)
|
||||||
|
-#define PX_P64_FAMILY (PX_X64 || PX_A64 || PX_RV64) // shortcut for 64-bit architectures
|
||||||
|
+#define PX_P64_FAMILY (PX_X64 || PX_A64 || PX_RV64 || PX_LN64) // shortcut for 64-bit architectures
|
||||||
|
|
||||||
|
/**
|
||||||
|
C++ standard library defines
|
||||||
|
diff -Naur qtquick3dphysics-everywhere-src-6.5.2/src/3rdparty/PhysX/source/physxextensions/src/serialization/SnSerialUtils.cpp qtquick3dphysics-everywhere-src-6.5.2-change/src/3rdparty/PhysX/source/physxextensions/src/serialization/SnSerialUtils.cpp
|
||||||
|
--- qtquick3dphysics-everywhere-src-6.5.2/src/3rdparty/PhysX/source/physxextensions/src/serialization/SnSerialUtils.cpp 2024-06-27 16:11:54.523604123 +0800
|
||||||
|
+++ qtquick3dphysics-everywhere-src-6.5.2-change/src/3rdparty/PhysX/source/physxextensions/src/serialization/SnSerialUtils.cpp 2024-06-27 16:11:09.539516263 +0800
|
||||||
|
@@ -39,7 +39,7 @@
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
-#define SN_NUM_BINARY_PLATFORMS 20
|
||||||
|
+#define SN_NUM_BINARY_PLATFORMS 21
|
||||||
|
const PxU32 sBinaryPlatformTags[SN_NUM_BINARY_PLATFORMS] =
|
||||||
|
{
|
||||||
|
PX_MAKE_FOURCC('W','_','3','2'),
|
||||||
|
@@ -60,6 +60,7 @@
|
||||||
|
PX_MAKE_FOURCC('W','A','6','4'),
|
||||||
|
PX_MAKE_FOURCC('L','A','3','2'),
|
||||||
|
PX_MAKE_FOURCC('L','V','6','4'),
|
||||||
|
+ PX_MAKE_FOURCC('L','N','6','4'),
|
||||||
|
PX_MAKE_FOURCC('U','N','K','_'),
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -84,6 +85,7 @@
|
||||||
|
"macarm",
|
||||||
|
"linuxarm",
|
||||||
|
"linuxrv64",
|
||||||
|
+ "linuxln64",
|
||||||
|
"unknown",
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -131,8 +133,10 @@
|
||||||
|
return sBinaryPlatformTags[17];
|
||||||
|
#elif PX_LINUX && PX_RV64
|
||||||
|
return sBinaryPlatformTags[18];
|
||||||
|
-#else
|
||||||
|
+#elif PX_LINUX && PX_LN64
|
||||||
|
return sBinaryPlatformTags[19];
|
||||||
|
+#else
|
||||||
|
+ return sBinaryPlatformTags[20];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
Name: qt6-%{qt_module}
|
Name: qt6-%{qt_module}
|
||||||
Version: 6.5.2
|
Version: 6.5.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Qt 6 Quick3D Physics Extensions
|
Summary: Qt 6 Quick3D Physics Extensions
|
||||||
License: GPL-3.0-only
|
License: GPL-3.0-only
|
||||||
URL: https://www.qt.io
|
URL: https://www.qt.io
|
||||||
@ -17,9 +17,8 @@ Source0: https://download.qt.io/official_releases/qt/%{short_version}/%{version}
|
|||||||
|
|
||||||
#fix physx on riscv64
|
#fix physx on riscv64
|
||||||
# https://github.com/felixonmars/archriscv-packages/pull/1821
|
# https://github.com/felixonmars/archriscv-packages/pull/1821
|
||||||
%ifarch riscv64
|
|
||||||
Patch0: physx-rv64.patch
|
Patch0: physx-rv64.patch
|
||||||
%endif
|
Patch1: physx-loongarch64.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -116,6 +115,10 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu June 27 2024 shaojiansong <shaojiansong@kylinos.cn> - 6.5.2-2
|
||||||
|
- Add support for loongarch64.
|
||||||
|
- Fix lack of patch files in src.rpm package which build from any platform.
|
||||||
|
|
||||||
* Thu Nov 30 2023 peijiankang <peijiankang@kylinos.cn> - 6.5.2-1
|
* Thu Nov 30 2023 peijiankang <peijiankang@kylinos.cn> - 6.5.2-1
|
||||||
- Update to 6.5.2
|
- Update to 6.5.2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user