forked from flatpak/freedesktop-sdk-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenal-fpu-neon.patch
34 lines (33 loc) · 1.08 KB
/
openal-fpu-neon.patch
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5784d35..a5a5049 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -360,6 +360,7 @@ SET(SSE_SWITCH "")
SET(SSE2_SWITCH "")
SET(SSE3_SWITCH "")
SET(SSE4_1_SWITCH "")
+SET(FPU_NEON_SWITCH "")
IF(NOT MSVC)
CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
IF(HAVE_MSSE_SWITCH)
@@ -377,6 +378,10 @@ IF(NOT MSVC)
IF(HAVE_MSSE4_1_SWITCH)
SET(SSE4_1_SWITCH "-msse4.1")
ENDIF()
+ CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_MFPU_NEON_SWITCH)
+ IF(HAVE_MFPU_NEON_SWITCH)
+ SET(FPU_NEON_SWITCH "-mfpu=neon")
+ ENDIF()
ENDIF()
CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));
@@ -759,6 +764,10 @@ IF(HAVE_ARM_NEON_H)
IF(ALSOFT_CPUEXT_NEON)
SET(HAVE_NEON 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/mixer_neon.c)
+ IF(FPU_NEON_SWITCH)
+ SET_SOURCE_FILES_PROPERTIES(Alc/mixer_neon.c PROPERTIES
+ COMPILE_FLAGS "${FPU_NEON_SWITCH}")
+ ENDIF()
SET(CPU_EXTS "${CPU_EXTS}, Neon")
ENDIF()
ENDIF()