aboutsummaryrefslogtreecommitdiffstats
path: root/meta-mentor-staging/recipes-core/systemd/systemd-boot/0001-Use-an-array-for-efi-ld-to-allow-for-ld-arguments.patch
blob: 5cb6227819f72eab118b8ed1e86688e82a3a7a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 586638384dd980628e1d51a29fd9324eab661834 Mon Sep 17 00:00:00 2001
From: Christopher Larson <chris_larson@mentor.com>
Date: Mon, 5 Oct 2020 22:06:12 +0500
Subject: [PATCH] Use an array for efi-ld to allow for ld arguments

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meson_options.txt        | 2 +-
 src/boot/efi/meson.build | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meson_options.txt b/meson_options.txt
index 44ff23f641..8dad5926db 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -305,7 +305,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 : 'array',
        description : 'the linker to use for EFI modules')
 option('efi-libdir', type : 'string',
        description : 'path to the EFI lib directory')
diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
index c1fe04597b..b42b202ad3 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
@@ -45,8 +45,8 @@ if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
                 efi_cc = cc.cmd_array()
         endif
         efi_ld = get_option('efi-ld')
-        if efi_ld == ''
-                efi_ld = find_program('ld', required: true)
+        if efi_ld.length() == 0
+                efi_ld = [find_program('ld', required: true)]
         endif
         efi_incdir = get_option('efi-includedir')
 
@@ -211,7 +211,7 @@ if have_gnu_efi
                         tuple[0],
                         input : tuple[2],
                         output : tuple[0],
-                        command : [efi_ld, '-o', '@OUTPUT@'] +
+                        command : efi_ld + ['-o', '@OUTPUT@'] +
                                   efi_ldflags + tuple[2] +
                                   ['-lefi', '-lgnuefi', libgcc_file_name])