boot: Use -ffile-prefix-map when present
authorJan Janssen <medhefgo@web.de>
Wed, 26 Jan 2022 23:35:36 +0000 (23:35 +0000)
committerLuca Boccassi <bluca@debian.org>
Wed, 26 Jan 2022 23:35:36 +0000 (23:35 +0000)
Origin: https://github.com/systemd/systemd/commit/1bc8417cfeeebb48b16039f26e0c75937784e75e

Gbp-Pq: Name boot-Use-ffile-prefix-map-when-present.patch

src/boot/efi/meson.build

index ea4f024a171542386279f017a78ae0640b8dcc2d..da64205bb574469b71253020f0177ba60f4ac60c 100644 (file)
@@ -209,7 +209,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