Tuesday, October 05, 2021

fix graphics/simgear build on !x86 archs

Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt 5 Oct 2021 13:54:22 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -459,7 +459,9 @@ if (CLANG)
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
+
+- set(SIMD_COMPILER_FLAGS "-msse2 -mfpmath=sse -ftree-vectorize -ftree-slp-vectorize")
++ if (X86 OR X86_64)
++ set(SIMD_COMPILER_FLAGS "-msse2 -mfpmath=sse -ftree-vectorize -ftree-slp-vectorize")
++ endif()
+ endif()
+
+ if (ENABLE_OPENMP)
Hi,
Looking at aarch64 and powerpc64 build logs I've found this error:

error: unknown FP unit 'sse'

The diff below disables SSE2 flags for CLANG as it is done
for GCC on non-x86 arches.
OK to commit?

Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt 5 Oct 2021 13:54:22 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -459,7 +459,9 @@ if (CLANG)
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")
+
+- set(SIMD_COMPILER_FLAGS "-msse2 -mfpmath=sse -ftree-vectorize
-ftree-slp-vectorize")
++ if (X86 OR X86_64)
++ set(SIMD_COMPILER_FLAGS "-msse2 -mfpmath=sse -ftree-vectorize
-ftree-slp-vectorize")
++ endif()
+ endif()
+
+ if (ENABLE_OPENMP)

No comments:

Post a Comment