From dc34413f43a16373c43fad087a43b1ee5ee69005 Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Sun, 26 Feb 2023 18:46:04 +0100 Subject: [PATCH] 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 Reviewed-by: Yonggang Luo Signed-off-by: David Heidelberg Part-of: --- 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 b51608f..f84d83a 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 ) -- 2.7.4