summaryrefslogtreecommitdiff
path: root/aarch64-support.patch
blob: d88fb16139c46affebcdc73974b0947c9f852f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak b/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak
index dd88b04..7454e8a 100644
--- a/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak
+++ b/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak
@@ -16,6 +16,8 @@ else ifneq (,$(findstring i686,$(MACHINE)))
 	HOST_PLATFORM = x86
 else ifneq (,$(findstring i386,$(MACHINE)))
 	HOST_PLATFORM = x86
+else ifneq (,$(findstring aarch64,$(MACHINE)))
+	HOST_PLATFORM = Arm64
 else ifneq (,$(findstring arm,$(MACHINE)))
 	HOST_PLATFORM = Arm
 else
diff --git a/ThirdParty/PSCommon/BuildSystem/Platform.Arm64 b/ThirdParty/PSCommon/BuildSystem/Platform.Arm64
new file mode 100644
index 0000000..2eb8966
--- /dev/null
+++ b/ThirdParty/PSCommon/BuildSystem/Platform.Arm64
@@ -0,0 +1,14 @@
+# Platform.Arm64 - native aarch64 build (added for openEuler aarch64)
+#
+# OpenNI 2.2.0 predates aarch64; this platform file intentionally defines
+# NO architecture-specific compiler flags (no SSE, no -march=armv7-a) and
+# relies on the toolchain defaults. NEON fast paths in the drivers are gated
+# behind XN_NEON (only set by the old arm32 Platform.Arm) and therefore fall
+# back to the scalar reference implementations on aarch64.
+#
+# Disable the GLUT-based NiViewer tool to avoid pulling in OpenGL/freeglut.
+export GLUT_SUPPORTED=0
+
+# 2014-era C++ sources: build against gnu++14 to stay clear of C++17
+# removals (dynamic exception specifications, the register keyword, etc.).
+CFLAGS += -std=gnu++14
diff --git a/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h b/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h
--- a/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h
+++ b/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h
@@ -53,6 +53,8 @@
 #include "Linux-x86/XnPlatformLinux-x86.h"
 #elif (__linux__ && __arm__)
 #include "Linux-Arm/XnPlatformLinux-Arm.h"
+#elif (__linux__ && __aarch64__)
+#include "Linux-x86/XnPlatformLinux-x86.h"
 #elif _ARC
 #include "ARC/XnPlaformARC.h"
 #elif (__APPLE__)