Discussion:
[PATCH v2] meson: use the host architecture compiler/linker for src/boot/efi
(too old to reply)
Helmut Grohne
2018-09-27 15:17:37 UTC
Permalink
cross building systemd to arm64 presently fails, because the build
system uses plain gcc and plain ld (build architecture compiler and
linker respectively) for building src/boot/efi. These values come from
the efi-cc and efi-ld options respectively. It rather should be using
host tools here.

Fixes: b710072da441 ("add support for building efi modules")
---
meson_options.txt | 4 ++--
src/boot/efi/meson.build | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)

Changes since v1 at https://github.com/systemd/systemd/pull/10177:
* Change canary values to empty strings.
* Simplify code by assigning variables twice.

diff --git a/meson_options.txt b/meson_options.txt
index 7b1f61bf4..92e8fadcc 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -278,9 +278,9 @@ option('dbus', type : 'combo', choices : ['auto', 'true', 'false'],

option('gnu-efi', type : 'combo', choices : ['auto', 'true', 'false'],
description : 'gnu-efi support for sd-boot')
-option('efi-cc', type : 'string', value : 'gcc',
+option('efi-cc', type : 'string',
description : 'the compiler to use for EFI modules')
-option('efi-ld', type : 'string', value : 'ld',
+option('efi-ld', type : 'string',
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 c5509e73d..39fbf7ec1 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
@@ -34,7 +34,13 @@ stub_sources = '''

if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
efi_cc = get_option('efi-cc')
+ if efi_cc == ''
+ efi_cc = ' '.join(cc.cmd_array())
+ endif
efi_ld = get_option('efi-ld')
+ if efi_ld == ''
+ efi_ld = find_program('ld', required: true)
+ endif
efi_incdir = get_option('efi-includedir')

gnu_efi_path_arch = ''
--
2.19.0
systemd github import bot
2018-09-27 16:07:08 UTC
Permalink
Patchset imported to github.
To create a pull request, one of the main developers has to initiate one via:
<https://github.com/systemd/systemd/compare/master...systemd-mailing-devs:20180927151736.GA17486%40alf.mars>

--
Generated by https://github.com/haraldh/mail2git
Lennart Poettering
2018-09-28 08:40:28 UTC
Permalink
Post by Helmut Grohne
cross building systemd to arm64 presently fails, because the build
system uses plain gcc and plain ld (build architecture compiler and
linker respectively) for building src/boot/efi. These values come from
the efi-cc and efi-ld options respectively. It rather should be using
host tools here.
Fixes: b710072da441 ("add support for building efi modules")
Hmm, any chance you could submit this through github please?

Lennart
--
Lennart Poettering, Red Hat
Simon McVittie
2018-09-28 12:19:27 UTC
Permalink
Post by Lennart Poettering
Post by Helmut Grohne
cross building systemd to arm64 presently fails, because the build
system uses plain gcc and plain ld (build architecture compiler and
linker respectively) for building src/boot/efi. These values come from
the efi-cc and efi-ld options respectively. It rather should be using
host tools here.
Fixes: b710072da441 ("add support for building efi modules")
Hmm, any chance you could submit this through github please?
This is an updated version for
<https://github.com/systemd/systemd/pull/10177> which is owned by mbiebl
(presumably Helmut isn't sending his own pull requests for whatever
reason).

smcv
Zbigniew Jędrzejewski-Szmek
2018-09-28 12:29:35 UTC
Permalink
Post by Simon McVittie
Post by Lennart Poettering
Post by Helmut Grohne
cross building systemd to arm64 presently fails, because the build
system uses plain gcc and plain ld (build architecture compiler and
linker respectively) for building src/boot/efi. These values come from
the efi-cc and efi-ld options respectively. It rather should be using
host tools here.
Fixes: b710072da441 ("add support for building efi modules")
Hmm, any chance you could submit this through github please?
This is an updated version for
<https://github.com/systemd/systemd/pull/10177> which is owned by mbiebl
(presumably Helmut isn't sending his own pull requests for whatever
reason).
I already submitted a new PR.

Zbyszek

Loading...