1 |
commit: 3e68014936059256d40d745a4e60dd46aeca52f9 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 27 12:53:56 2023 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 27 13:15:23 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e680149 |
7 |
|
8 |
sys-apps/fwupd-efi: restore the old option for setting the linker |
9 |
|
10 |
Between 1.3 and 1.4, fwupd-efi upstream phased this option out in favour |
11 |
of using standard Meson toolchain management for both the compiler and |
12 |
the linker. However, the transition has not been completed yet and |
13 |
the linking phase still involves a custom target explicitly calling the |
14 |
linker executable - and the way the name of said executable is |
15 |
determined at the moment is not entirely robust. |
16 |
|
17 |
Closes: https://bugs.gentoo.org/892339 |
18 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
19 |
|
20 |
.../files/fwupd-efi-1.4-efi_ld_override.patch | 26 ++++++++++++++++++++++ |
21 |
sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild | 7 +++++- |
22 |
2 files changed, 32 insertions(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/sys-apps/fwupd-efi/files/fwupd-efi-1.4-efi_ld_override.patch b/sys-apps/fwupd-efi/files/fwupd-efi-1.4-efi_ld_override.patch |
25 |
new file mode 100644 |
26 |
index 000000000000..0b703a41d2e6 |
27 |
--- /dev/null |
28 |
+++ b/sys-apps/fwupd-efi/files/fwupd-efi-1.4-efi_ld_override.patch |
29 |
@@ -0,0 +1,26 @@ |
30 |
+--- a/efi/meson.build |
31 |
++++ b/efi/meson.build |
32 |
+@@ -1,6 +1,7 @@ |
33 |
+ generate_sbat = find_program('generate_sbat.py', native: true) |
34 |
+ generate_binary = find_program('generate_binary.py', native: true) |
35 |
+ |
36 |
++efi_ld = get_option('efi-ld') |
37 |
+ efi_ldsdir = get_option('efi-ldsdir') |
38 |
+ efi_incdir = get_option('efi-includedir') |
39 |
+ |
40 |
+@@ -226,7 +227,7 @@ |
41 |
+ so = custom_target('fwup.so', |
42 |
+ input : [o_file1, o_file2, o_file3, o_file4, o_file5], |
43 |
+ output : 'fwup.so', |
44 |
+- command : [ld, '-o', '@OUTPUT@'] + |
45 |
++ command : [efi_ld, '-o', '@OUTPUT@'] + |
46 |
+ efi_ldflags + ['@INPUT@'] + |
47 |
+ ['-lefi', '-lgnuefi', libgcc_file_name], |
48 |
+ depends: fwupd_so_deps) |
49 |
+--- a/meson_options.txt |
50 |
++++ b/meson_options.txt |
51 |
+@@ -1,3 +1,4 @@ |
52 |
++option('efi-ld', type : 'string', value : 'ld', description : 'the linker to use for EFI modules') |
53 |
+ option('efi-libdir', type : 'string', description : 'path to the EFI lib directory') |
54 |
+ option('efi-ldsdir', type : 'string', description : 'path to the EFI lds directory') |
55 |
+ option('efi-includedir', type : 'string', value : '/usr/include/efi', description : 'path to the EFI header directory') |
56 |
|
57 |
diff --git a/sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild b/sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild |
58 |
index d90dd1db3a4e..a10efcfde644 100644 |
59 |
--- a/sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild |
60 |
+++ b/sys-apps/fwupd-efi/fwupd-efi-1.4.ebuild |
61 |
@@ -5,7 +5,7 @@ EAPI=8 |
62 |
|
63 |
PYTHON_COMPAT=( python3_{9..11} ) |
64 |
|
65 |
-inherit meson python-any-r1 |
66 |
+inherit meson python-any-r1 toolchain-funcs |
67 |
|
68 |
DESCRIPTION="EFI executable for fwupd" |
69 |
HOMEPAGE="https://fwupd.org" |
70 |
@@ -31,6 +31,10 @@ DEPEND="sys-boot/gnu-efi" |
71 |
|
72 |
RDEPEND="!<sys-apps/fwupd-1.6.0" |
73 |
|
74 |
+PATCHES=( |
75 |
+ "${FILESDIR}"/${PN}-1.4-efi_ld_override.patch # Bug #892339 |
76 |
+) |
77 |
+ |
78 |
python_check_deps() { |
79 |
python_has_version "dev-python/pefile[${PYTHON_USEDEP}]" |
80 |
} |
81 |
@@ -43,6 +47,7 @@ src_prepare() { |
82 |
|
83 |
src_configure() { |
84 |
local emesonargs=( |
85 |
+ -Defi-ld="$(tc-getLD)" |
86 |
-Defi-libdir="${EPREFIX}"/usr/$(get_libdir) |
87 |
-Defi_sbat_distro_id="gentoo" |
88 |
-Defi_sbat_distro_summary="Gentoo GNU/Linux" |