On 2022-06-29 01:56, Peter Robinson wrote:
Hello team,

What is the way to disable `-mss2 for aarch64 build in embree?
I think you mean msse2, the build should be using the distro default C
flags for builds so it shouldn't be an issue, if you fix the build to
use the proper distro flags the problem should go away. Details in the
docs:

https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags

Spec file: https://src.fedoraproject.org/rpms/embree/blob/rawhide/f/embree.spec

Scratch build result: https://koji.fedoraproject.org/koji/taskinfo?taskID=88867571
Completely not the right way to fix it, you're note actually supposed
to be overwriting the SSE levels set by the base project else it won't
run on older x86 devices either, but the below worked for me on a
scratch build. The aarch64 arch sets NEON by default so if you were
using the proper defaults you'd actually have gott hat anyway.

diff --git a/embree.spec b/embree.spec
index b2e6d8e..a9e8c91 100644
--- a/embree.spec
+++ b/embree.spec
@@ -92,6 +92,9 @@ export CXXFLAGS="%{optflags} -Wl,--as-needed"
         -DEMBREE_MAX_ISA=SSE4.2 \
 %else
         -DEMBREE_MAX_ISA=NONE \
+%endif
+%ifarch aarch64
+        -DEMBREE_MAX_ISA=NEON \
 %endif
        -DEMBREE_TUTORIALS=OFF
 %cmake_build

I figured out that line hence the use of -DEMBREE_MAX_ISA=DEFAULT` as a more elegant approach. Unfortunately, the build failed for aarch64 in this version compared to its predecessor 3.13.2.


-- 
Luya Tshimbalanga
Fedora Design Team
Fedora Design Suite maintainer