]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Reorder cflags for sd-boot
authorJan Janssen <medhefgo@web.de>
Thu, 16 Jun 2022 19:53:30 +0000 (21:53 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Jun 2022 03:57:41 +0000 (12:57 +0900)
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.

src/boot/efi/meson.build

index 1e42f8b08e0c297ab24a6bccf89777d647684b90..52e2a71a7c8c11ed1669a004d8343db8802ceaae 100644 (file)
@@ -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'],