1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

boot: Use -ffile-prefix-map when present

This should make sure the stub elf binary is reproducible.

Fixes: #22157
This commit is contained in:
Jan Janssen 2022-01-19 16:37:25 +01:00 committed by Luca Boccassi
parent b09869eaf7
commit 1bc8417cfe

View 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