Package: meson
User: helm...@debian.org
Usertags: rebootstrap
Control: affects -1 + src:systemd

systemd fails to cross build from source for uefi architectures (e.g.
arm64), because the generated cross file does not include all relevant
tools. In particular, systemd needs ld and objcopy, both of which are
presently missing from debcrossgen.

Rather than adding them, let me propose a more generic solution. Add a
new field to cross files. I'll call it "tool_prefix" for now, but you
can choose a better name of course. When tool_prefix is empty or not
set, meson behaves as before. When it is set however, find_program
behaves differently. When find_program is instructed to look for foo
(with native=False), it first looks whether foo is assigned in the cross
file (as before). If it isn't assigned, it searches $PATH for the
concatenation of tool_prefix and foo. If it finds something, that one is
used. In case nothing is found, it proceeds searching $PATH for simply
foo.

For Debian systems, most architecture-dependent tools carry the GNU
triplet as prefix. Thus we can assign "${DEB_HOST_GNU_TYPE}-" as the
tool_prefix and solve most of missing entries.

Please consider implementing the proposed tool_prefix rather than just
adding ld and objcopy to debcrossgen.

Helmut

Reply via email to