From 7afd0196b6a69fefd18236fa3434f90ce052040c Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Wed, 26 Jan 2022 12:29:57 +0100 Subject: [PATCH] meson: Use --no-wchar-size-warning This only disables the one warning that we care to ignore, making sure that any future issues do not get masked. --- src/boot/efi/meson.build | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 84021c3f360..d23352d48e5 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -256,17 +256,11 @@ else endif if efi_arch[1] == 'arm' - # On arm, the compiler (correctly) gives us the following warning: - # libgcc.a(_popcountsi2.o) uses 4-byte wchar_t yet the output is to - # use 2-byte wchar_t; use of wchar_t values across objects may fail - # - # libgcc does not have any occurrences of wchar_t in its sources or the - # documentation, so it's safe to assume that we can ignore this warning. - # - # So far, this only happens with arm due to popcount even though x86 and - # x86_64 also have to rely on libgcc's popcount. Therefore, we only disable - # this for arm to make sure this doesn't mask other issues in the future. - efi_ldflags += ['-Wl,--no-warn-mismatch'] + # On arm, the compiler (correctly) warns about wchar_t size mismatch. This + # is because libgcc is not compiled with -fshort-wchar, but it does not + # have any occurrences of wchar_t in its sources or the documentation, so + # it is safe to assume that we can ignore this warning. + efi_ldflags += ['-Wl,--no-wchar-size-warning'] endif if run_command('grep', '-q', '__CTOR_LIST__', efi_lds, check: false).returncode() == 0 -- 2.47.3