Skip to content

Commit e67e669

Browse files
medhefgobluca
authored andcommitted
boot: Fix armhf build failure
Fixes: systemd#21842
1 parent 3112d75 commit e67e669

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/boot/efi/meson.build

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,20 @@ else
294294
efi_format = ['--target=efi-app-@0@'.format(efi_arch[1])]
295295
endif
296296

297+
if efi_arch[1] == 'arm'
298+
# On arm, the compiler (correctly) gives us the following warning:
299+
# libgcc.a(_popcountsi2.o) uses 4-byte wchar_t yet the output is to
300+
# use 2-byte wchar_t; use of wchar_t values across objects may fail
301+
#
302+
# libgcc does not have any occurences of wchar_t in its sources or the
303+
# documentation, so it's safe to assume that we can ignore this warning.
304+
#
305+
# So far, this only happens with arm due to popcount even though x86 and
306+
# x86_64 also have to rely on libgcc's popcount. Therefore, we only disable
307+
# this for arm to make sure this doesn't mask other issues in the future.
308+
efi_ldflags += ['-Wl,--no-warn-mismatch']
309+
endif
310+
297311
if run_command('grep', '-q', '__CTOR_LIST__', efi_lds).returncode() == 0
298312
# fedora has a patched gnu-efi that adds support for ELF constructors.
299313
# If ld is called by gcc something about these symbols breaks, resulting

0 commit comments

Comments
 (0)