From: Jan Janssen Date: Thu, 16 Jun 2022 19:53:30 +0000 (+0200) Subject: meson: Reorder cflags for sd-boot X-Git-Tag: v252-rc1~800 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01d81c126b1383d8ab858f43395b304e178feed1;p=thirdparty%2Fsystemd.git meson: Reorder cflags for sd-boot Currently, -Wall and -Wextra override previously passed flags like -Wno-unused-parameter. This reorders them to be passed before any optional flags. -Wsign-compare is part of -Wextra and therefore dropped. -nostdlib is a link-stage flag and dropped as it is already part of efi_ldflags. --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 1e42f8b08e0..52e2a71a7c8 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -174,32 +174,30 @@ efi_config_h = configure_file( output : 'efi_config.h', configuration : efi_conf) -efi_cflags = cc.get_supported_arguments( - basic_disabled_warnings + - possible_common_cc_flags + [ - '-fno-stack-protector', - '-fno-strict-aliasing', - '-fpic', - '-fwide-exec-charset=UCS2', - '-Wall', - '-Wextra', - '-Wsign-compare', - ] -) + [ - '-nostdlib', - '-std=gnu11', +efi_cflags = [ + '-DGNU_EFI_USE_MS_ABI', + '-DSD_BOOT', '-ffreestanding', '-fshort-wchar', '-fvisibility=hidden', - '-isystem', efi_incdir, - '-isystem', efi_incdir / efi_arch[1], '-I', fundamental_path, '-I', meson.current_source_dir(), - '-DSD_BOOT', - '-DGNU_EFI_USE_MS_ABI', '-include', efi_config_h, '-include', version_h, -] + '-isystem', efi_incdir / efi_arch[1], + '-isystem', efi_incdir, + '-std=gnu11', + '-Wall', + '-Wextra', +] + cc.get_supported_arguments( + basic_disabled_warnings + + possible_common_cc_flags + [ + '-fno-stack-protector', + '-fno-strict-aliasing', + '-fpic', + '-fwide-exec-charset=UCS2', + ] +) efi_cflags += cc.get_supported_arguments({ 'ia32': ['-mno-sse', '-mno-mmx'],