From: Jan Janssen Date: Wed, 19 Jan 2022 15:37:25 +0000 (+0100) Subject: boot: Use -ffile-prefix-map when present X-Git-Tag: v251-rc1~498 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bc8417cfeeebb48b16039f26e0c75937784e75e;p=thirdparty%2Fsystemd.git boot: Use -ffile-prefix-map when present This should make sure the stub elf binary is reproducible. Fixes: #22157 --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index fad92f09a1c..0f14b9ccb75 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -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