From dede8d384f6bfcf66bc0468cb34736a8c1ba63ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 15 Dec 2022 13:38:27 +0100 Subject: [PATCH] embree: Fix Linux ARM64 build with `-flax-vector-conversions` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a change done upstream in the `devel3` branch for 3.13.6: https://github.com/embree/embree/commit/82ca6b5ccb7abe0403a658a0e079926478f04cb1 They also seem to define it for macOS, but for us it breaks the build... ¯\_(ツ)_/¯ Also change wrong use of CPPFLAGS (pre-processor) where CXXFLAGS (C++) makes more sense. (cherry picked from commit b5a8055b5cf69a63e32045f433bf1e7fd39d49ad) --- modules/raycast/SCsub | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/raycast/SCsub b/modules/raycast/SCsub index 27d6264e0e8..13cbd4f3933 100644 --- a/modules/raycast/SCsub +++ b/modules/raycast/SCsub @@ -68,10 +68,10 @@ if env["builtin_embree"]: if not env.msvc: if env["arch"] in ["x86", "x86_64"]: - env_raycast.Append(CPPFLAGS=["-msse2", "-mxsave"]) + env_raycast.Append(CCFLAGS=["-msse2", "-mxsave"]) if env["platform"] == "windows": - env_raycast.Append(CPPFLAGS=["-mstackrealign"]) + env_raycast.Append(CCFLAGS=["-mstackrealign"]) if env["platform"] == "windows": if env.msvc: @@ -90,8 +90,11 @@ if env["builtin_embree"]: if not env.msvc: # Flags synced with upstream gnu.cmake. + if env["arch"] == "arm64" and env["platform"] == "x11": + env_thirdparty.Append(CXXFLAGS=["-flax-vector-conversions"]) + env_thirdparty.Append( - CPPFLAGS=[ + CXXFLAGS=[ "-fno-strict-overflow", "-fno-delete-null-pointer-checks", "-fwrapv",