File: cmake_compiler_flags.patch

package info (click to toggle)
serious-engine 0~git20250928%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 21,820 kB
  • sloc: cpp: 142,931; yacc: 2,399; lex: 641; asm: 282; python: 121; sh: 51; makefile: 20
file content (42 lines) | stat: -rw-r--r-- 1,591 bytes parent folder | download
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
Description: cleanup compiler flags, specificaly for i386/armel/armhf/aarch64
Forwarded: not-needed
Author: Sébastien Noel <sebastien@twolife.be>
--- a/Sources/CMakeLists.txt
+++ b/Sources/CMakeLists.txt
@@ -8,6 +8,7 @@
 option(USE_SYSTEM_SDL2 "Use systems sdl2 development files" On)
 option(USE_SYSTEM_ZLIB "Use systems zlib development files" On)
 option(USE_CCACHE "Set to ON to use ccache if present in the system" ${USE_CCACHE})
+option(HAS_NEON "Use ARM Advanced SIMD" FALSE)
 
 
 # fallback for cmake versions without add_compile_options # RAKE! Borrowed from dhewm3 project
@@ -102,22 +105,14 @@
 	add_compile_options(-Wall)
 	add_compile_options(-pipe)
 	add_compile_options(-fPIC)
-	if(NOT PANDORA AND NOT PYRA AND NOT (MACOSX AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"))
-		add_compile_options(-march=native)
-	endif()
-	if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm.*")
-		if(PYRA)
+	if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i[0-9]86")
+		add_compile_options(-mmmx)
+		add_compile_options(-msse)
+		add_compile_options(-msse2)
+	elseif(HAS_NEON)
-		add_compile_options(-mfpu=neon-vfpv4)
-		add_compile_options(-mcpu=cortex-a15)
-		add_compile_options(-mfloat-abi=hard)
-		add_compile_options(-marm)
-                elseif(NOT (MACOSX AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"))
-                    add_compile_options(-mfpu=neon)
-		else()
 		add_compile_options(-mfpu=neon)
-		endif()
-		add_compile_options(-fsigned-char)
 	endif()
+	add_compile_options(-fsigned-char)
         add_compile_options(-fno-strict-aliasing)
 	add_definitions(-D_REENTRANT=1)
 	add_definitions(-D_MT=1)