From: Peter Seiderer <ps.report@gmx•net>
To: Junio C Hamano <gitster@pobox•com>
Cc: Patrick Steinhardt <ps@pks•im>, git@vger•kernel.org
Subject: Re: Meson build leaks host 'sh' path to target build when cross-compiled
Date: Tue, 11 Feb 2025 09:55:44 +0100 [thread overview]
Message-ID: <20250211095544.66226abc@gmx.net> (raw)
In-Reply-To: <xmqqpljpa83y.fsf@gitster.g>
Hello Junio,
On Mon, 10 Feb 2025 11:54:25 -0800, Junio C Hamano <gitster@pobox•com> wrote:
> Peter Seiderer <ps.report@gmx•net> writes:
>
> > Maybe all doing (autoconf) cross builds where happy with the defaults
> > from the Makefile (SHELL_PATH = /bin/sh, PERL_PATH = /usr/bin/perl)
> > on host and target (as the buildroot autoconf package since 2013) and
> > only users doing native builds fiddled around with non-default values?
>
> I somehow doubt it.
>
> The problem I see is that there is no distinction between "this is
> the path for the shell on the target system" vs "this is the shell
> we run on the host while building the package" in the Makefile. Use
> of autoconf would not magically change it; the Makefile that
> includes the config.mak.autogen needs to be aware of the
> distinction.
Found no problem/special-handling in buildroot ([1]) or yocto ([2]) for
SHELL_PATH, but you are right regarding the PERL_PATH in yocto using
38 EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
and
49 EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'"
and a fixup for the resulting files
76 perl_native_fixup () {
77 sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
78 -e 's#${libdir}/perl-native/#${libdir}/#' \
79 ${@d.getVar("PERLTOOLS").replace(' /',d.getVar('D') + '/')}
Yes, doing a distinct handling for host/target path for sh/perl for
meson/autoconf is for sure the right thing ;-)
Regards,
Peter
[1] https://gitlab.com/buildroot.org/buildroot/-/blob/master/package/git/git.mk
[2] https://git.yoctoproject.org/poky/tree/meta/recipes-devtools/git/git_2.48.1.bb
prev parent reply other threads:[~2025-02-11 8:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-09 12:30 Meson build leaks host 'sh' path to target build when cross-compiled Peter Seiderer
2025-02-10 7:41 ` Patrick Steinhardt
2025-02-10 11:26 ` Peter Seiderer
2025-02-18 11:47 ` Patrick Steinhardt
2025-02-18 14:41 ` Eli Schwartz
2025-02-10 16:18 ` Junio C Hamano
2025-02-10 16:43 ` Peter Seiderer
2025-02-10 19:54 ` Junio C Hamano
2025-02-11 8:55 ` Peter Seiderer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250211095544.66226abc@gmx.net \
--to=ps.report@gmx$(echo .)net \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=ps@pks$(echo .)im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox