From: Jan Janssen Date: Wed, 26 Jan 2022 09:20:46 +0000 (+0100) Subject: meson: Use same name format for efi binary intermediates X-Git-Tag: v251-rc1~454^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6167d96117fcb3f737c9b3534e858dcdcaa5aa0;p=thirdparty%2Fsystemd.git meson: Use same name format for efi binary intermediates --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 20b0c4bf7c0..84021c3f360 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -397,16 +397,12 @@ foreach file : fundamental_source_paths + common_sources + systemd_boot_sources endif endforeach -systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(efi_arch[0]) -stub_elf_name = 'linux@0@.elf.stub'.format(efi_arch[0]) -stub_efi_name = 'linux@0@.efi.stub'.format(efi_arch[0]) - -foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects, false], - [stub_elf_name, stub_efi_name, stub_objects, true]] - so = custom_target( - tuple[0], - input : tuple[2], - output : tuple[0], +foreach tuple : [['systemd-boot@0@.@1@', systemd_boot_objects, false], + ['linux@0@.@1@.stub', stub_objects, true]] + elf = custom_target( + tuple[0].format(efi_arch[0], 'elf'), + input : tuple[1], + output : tuple[0].format(efi_arch[0], 'elf'), command : [cc.cmd_array(), '-o', '@OUTPUT@', efi_cflags, @@ -415,13 +411,13 @@ foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects '-lefi', '-lgnuefi', '-lgcc'], - install : tuple[3], + install : tuple[2], install_dir : bootlibdir) custom_target( - tuple[1], - input : so, - output : tuple[1], + tuple[0].format(efi_arch[0], 'efi'), + input : elf, + output : tuple[0].format(efi_arch[0], 'efi'), command : [objcopy, '-j', '.bss*', '-j', '.data', diff --git a/tools/debug-sd-boot.sh b/tools/debug-sd-boot.sh index 816eead22df..1bd2cc406db 100755 --- a/tools/debug-sd-boot.sh +++ b/tools/debug-sd-boot.sh @@ -32,10 +32,10 @@ fi binary=$(realpath "${1}") if [[ "${1}" =~ systemd-boot([[:alnum:]]+).efi ]]; then target="systemd-boot" - symbols=$(realpath "$(dirname "${1}")/systemd_boot.so") + symbols=$(realpath "${1%efi}elf") elif [[ "${1}" =~ linux([[:alnum:]]+).efi.stub ]]; then target="systemd-stub" - symbols=$(realpath "$(dirname "${1}")/linux${BASH_REMATCH[1]}.elf.stub") + symbols=$(realpath "${1%efi.stub}elf.stub") else echo "Cannot detect EFI binary '${1}'." exit 1