@samitouri / QOSamiQemu / commits / 501187d0bc

meson: make linker warnings non-fatal on Linux

These cause a werror=true build to fail with Meson 1.12.0, as it now makes linker warnings fatal as well. Cc: qemu-stable@nongnu.org Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo Bonzini committed Aug 17, 2026 at 15:14 UTC 501187d0bc62a46628acc25e0ea0187094f04246
1 file changed +5
meson.build
+5
@@ -602,6 +602,11 @@ if host_os == 'windows'
602 qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,--nxcompat')
603 qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase', '-Wl,--high-entropy-va')
604 endif
605 +if host_os == 'linux' and get_option('werror') and get_option('prefer_static')
606 + # On glibc systems, glib causes warnings about getpwuid, getpwuid_r
607 + # and getpwnam_r not being supported with static linking
608 + qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-fatal-warnings')
609 +endif
610
611 if get_option('fuzzing')
612 # Specify a filter to only instrument code that is directly related to