]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemd-boot: LLVM/lld does not support PE/COFF relocations. Bail out with an error...
authortpgxyz <tpgxyz@gmail.com>
Thu, 18 Mar 2021 11:24:27 +0000 (12:24 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 19 Mar 2021 19:42:47 +0000 (19:42 +0000)
src/boot/efi/meson.build

index fdbbed6f839da2a17eaff3ccc8b28a55d4407d61..bb5f591fe56eace8b511bff7c1f5953caf102748 100644 (file)
@@ -45,10 +45,17 @@ 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')
+        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
+                error('LLVM/lld does not support PE/COFF relocations. Use different linker for EFI image.')
+        endif
+
         efi_incdir = get_option('efi-includedir')
 
         gnu_efi_path_arch = ''