]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Use -ffile-prefix-map when present
authorJan Janssen <medhefgo@web.de>
Wed, 19 Jan 2022 15:37:25 +0000 (16:37 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 19 Jan 2022 21:06:24 +0000 (21:06 +0000)
This should make sure the stub elf binary is reproducible.

Fixes: #22157
src/boot/efi/meson.build

index fad92f09a1cf7e43f1e9f9de860b516eb9a4e288..0f14b9ccb75fe3937c91ac2021e43ac7f904e6f9 100644 (file)
@@ -210,7 +210,17 @@ if get_option('b_lto')
 endif
 
 foreach arg : get_option('c_args')
-        if arg in ['-Werror', '-g', '-ggdb', '-O1', '-O2', '-O3', '-Og', '-Os', '-DNDEBUG', '-flto', '-fno-lto']
+        if arg in [
+                '-DNDEBUG',
+                '-fno-lto',
+                '-g', '-ggdb',
+                '-O1', '-O2', '-O3', '-Og', '-Os',
+                '-Werror',
+           ] or arg.split('=')[0] in [
+                '-ffile-prefix-map',
+                '-flto',
+           ]
+
                 message('Using "@0@" from c_args for EFI compiler'.format(arg))
                 efi_cflags += arg
         endif