]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Fix armhf build failure
authorJan Janssen <medhefgo@web.de>
Tue, 21 Dec 2021 12:44:47 +0000 (13:44 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 21 Dec 2021 16:34:51 +0000 (16:34 +0000)
Fixes: #21842
src/boot/efi/meson.build

index a108bf16ab48ca601f7c456e404f42ea4caab330..df866c3eb8b4623d57ed8a179acc2bf79147c749 100644 (file)
@@ -294,6 +294,20 @@ else
         efi_format = ['--target=efi-app-@0@'.format(efi_arch[1])]
 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 occurences 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']
+endif
+
 if run_command('grep', '-q', '__CTOR_LIST__', efi_lds).returncode() == 0
         # fedora has a patched gnu-efi that adds support for ELF constructors.
         # If ld is called by gcc something about these symbols breaks, resulting