]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: fix warning about comparison between different types
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Mar 2021 11:52:00 +0000 (20:52 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 22 Mar 2021 13:40:46 +0000 (14:40 +0100)
Follow-up for e39288193fcdf3a36dbc49b78e6c9bf86a764e31.

meson_options.txt
src/boot/efi/meson.build

index bcc0dc11f879a673058c0adc20a004d0f92ca769..d96d4e3f047c859832ea384d75f054d4d1feccc6 100644 (file)
@@ -362,7 +362,7 @@ option('gnu-efi', type : 'combo', choices : ['auto', 'true', 'false'],
        description : 'gnu-efi support for sd-boot')
 option('efi-cc', type : 'array',
        description : 'the compiler to use for EFI modules')
-option('efi-ld', type : 'string',
+option('efi-ld', type : 'string', value : 'ld',
        description : 'the linker to use for EFI modules')
 option('efi-libdir', type : 'string',
        description : 'path to the EFI lib directory')
index bb5f591fe56eace8b511bff7c1f5953caf102748..2a37b0a9ac69f96689610ccb833882f6315b1564 100644 (file)
@@ -45,14 +45,12 @@ if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
         if efi_cc.length() == 0
                 efi_cc = cc.cmd_array()
         endif
-        efi_ld = get_option('efi-ld').to_lower()
-        if efi_ld == ''
-                efi_ld = find_program('ld', required: true)
-        endif
 
-        if efi_ld == 'lld' or efi_ld == 'ld.lld'
-# LLVM/LLD does not support PE/COFF relocations
-# https://lists.llvm.org/pipermail/llvm-dev/2021-March/149234.html
+        efi_ld = find_program(get_option('efi-ld'), required: true)
+        efi_ld_name = efi_ld.path().split('/')[-1]
+        if efi_ld_name == 'lld' or efi_ld_name == 'ld.lld'
+                # LLVM/LLD does not support PE/COFF relocations
+                # https://lists.llvm.org/pipermail/llvm-dev/2021-March/149234.html
                 error('LLVM/lld does not support PE/COFF relocations. Use different linker for EFI image.')
         endif