Skip to content

Commit 1bc8417

Browse files
medhefgobluca
authored andcommitted
boot: Use -ffile-prefix-map when present
This should make sure the stub elf binary is reproducible. Fixes: systemd#22157
1 parent b09869e commit 1bc8417

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/boot/efi/meson.build

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,17 @@ if get_option('b_lto')
210210
endif
211211

212212
foreach arg : get_option('c_args')
213-
if arg in ['-Werror', '-g', '-ggdb', '-O1', '-O2', '-O3', '-Og', '-Os', '-DNDEBUG', '-flto', '-fno-lto']
213+
if arg in [
214+
'-DNDEBUG',
215+
'-fno-lto',
216+
'-g', '-ggdb',
217+
'-O1', '-O2', '-O3', '-Og', '-Os',
218+
'-Werror',
219+
] or arg.split('=')[0] in [
220+
'-ffile-prefix-map',
221+
'-flto',
222+
]
223+
214224
message('Using "@0@" from c_args for EFI compiler'.format(arg))
215225
efi_cflags += arg
216226
endif

0 commit comments

Comments
 (0)