Module: Mesa
Branch: main
Commit: dc34413f43a16373c43fad087a43b1ee5ee69005
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc34413f43a16373c43fad087a43b1ee5ee69005

Author: David Heidelberg <[email protected]>
Date:   Sun Feb 26 18:46:04 2023 +0100

meson: implement quirk for the compilation under armv7 GCC with LTO

Until https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108163 gets fixed.

Acked-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Yonggang Luo <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21554>

---

 src/util/format/meson.build | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/util/format/meson.build b/src/util/format/meson.build
index b51608f5275..f84d83a43ac 100644
--- a/src/util/format/meson.build
+++ b/src/util/format/meson.build
@@ -33,6 +33,13 @@ files_mesa_format = [
   'u_format_zs.c',
 ]
 
+# TODO: remove the quirk when GCC get test and fix inside release
+# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108163
+arm_neon_workaround = []
+if cc.get_id() == 'gcc' and host_machine.cpu_family().contains('arm')
+  arm_neon_workaround = gcc_lto_quirk
+endif
+
 u_format_pack_h = custom_target(
   'u_format_pack.h',
   input : ['u_format_table.py', 'u_format.csv'],
@@ -58,7 +65,7 @@ libmesa_format = static_library(
   # NOTE dep_valgrind used here instead of idep_mesautil due to chicken/egg
   # dependencies between util and util/format
   dependencies : [dep_m, dep_valgrind],
-  c_args : [c_msvc_compat_args],
+  c_args : [c_msvc_compat_args, arm_neon_workaround],
   gnu_symbol_visibility : 'hidden',
   build_by_default : false
 )

Reply via email to