summaryrefslogtreecommitdiff
path: root/openni2-aarch64-support.patch
blob: 8718ce914c9fa8e3b0697d8780f54437bfd9d2e8 (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
diff -ruN '--exclude=.git' '--exclude=.github' ./ThirdParty/PSCommon/BuildSystem/CommonDefs.mak ../OpenNI2-patched/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak
--- a/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak	2026-10-22 03:13:34.628894060 +0000
+++ b/ThirdParty/PSCommon/BuildSystem/CommonDefs.mak	2026-10-22 03:24:42.065885094 +0000
@@ -18,6 +18,8 @@
 	HOST_PLATFORM = x86
 else ifneq (,$(findstring arm,$(MACHINE)))
 	HOST_PLATFORM = Arm
+else ifneq (,$(findstring aarch64,$(MACHINE)))
+	HOST_PLATFORM = Aarch64
 else
 	DUMMY:=$(error Can't determine host platform)
 endif
diff -ruN '--exclude=.git' '--exclude=.github' ./ThirdParty/PSCommon/BuildSystem/Platform.Aarch64 ../OpenNI2-patched/ThirdParty/PSCommon/BuildSystem/Platform.Aarch64
--- a/ThirdParty/PSCommon/BuildSystem/Platform.Aarch64	1970-01-01 00:00:00.000000000 +0000
+++ b/ThirdParty/PSCommon/BuildSystem/Platform.Aarch64	2026-10-22 03:24:42.068885103 +0000
@@ -0,0 +1,4 @@
+ifeq "$(CFG)" "Release"
+    CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing
+    CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations
+endif
diff -ruN '--exclude=.git' '--exclude=.github' ./ThirdParty/PSCommon/XnLib/Include/Linux-Aarch64/XnPlatformLinux-Aarch64.h ../OpenNI2-patched/ThirdParty/PSCommon/XnLib/Include/Linux-Aarch64/XnPlatformLinux-Aarch64.h
--- a/ThirdParty/PSCommon/XnLib/Include/Linux-Aarch64/XnPlatformLinux-Aarch64.h	1970-01-01 00:00:00.000000000 +0000
+++ b/ThirdParty/PSCommon/XnLib/Include/Linux-Aarch64/XnPlatformLinux-Aarch64.h	2026-10-22 03:24:42.069885106 +0000
@@ -0,0 +1,8 @@
+#ifndef _XN_PLATFORM_LINUX_AARCH64_H_
+#define _XN_PLATFORM_LINUX_AARCH64_H_
+#include "../Linux-x86/XnPlatformLinux-x86.h"
+#undef XN_PLATFORM
+#undef XN_PLATFORM_STRING
+#define XN_PLATFORM XN_PLATFORM_LINUX_ARM
+#define XN_PLATFORM_STRING "Linux-Aarch64"
+#endif
diff -ruN '--exclude=.git' '--exclude=.github' ./ThirdParty/PSCommon/XnLib/Include/XnPlatform.h ../OpenNI2-patched/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h
--- a/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h	2026-10-22 03:13:34.655894141 +0000
+++ b/ThirdParty/PSCommon/XnLib/Include/XnPlatform.h	2026-10-22 03:24:42.077885129 +0000
@@ -51,6 +51,8 @@
 #include "Android-Arm/XnPlatformAndroid-Arm.h"
 #elif (__linux__ && (i386 || __x86_64__))
 #include "Linux-x86/XnPlatformLinux-x86.h"
+#elif (__linux__ && __aarch64__)
+#include "Linux-Aarch64/XnPlatformLinux-Aarch64.h"
 #elif (__linux__ && __arm__)
 #include "Linux-Arm/XnPlatformLinux-Arm.h"
 #elif _ARC