From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH-for-master 1/2] package/meson: don't install cross-compilation.conf during target-finalize
Date: Tue, 26 Feb 2019 19:52:48 +0100 [thread overview]
Message-ID: <877edmcrgf.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20190225211147.14947-2-patrickdepinguin@gmail.com> (Thomas De Schampheleire's message of "Mon, 25 Feb 2019 22:11:46 +0100")
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:
> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> package/meson installs a cross-compilation.conf file in
> $(HOST_DIR)/etc/meson, via TARGET_FINALIZE_HOOKS.
> package/pkg-cmake.mk installs a toolchainfile.cmake in
> $(HOST_DIR)/share/buildroot, via TOOLCHAIN_POST_INSTALL_STAGING_HOOKS.
> Both files have a similar concept, they describe some flags/paths needed for
> compilation using respective build systems. One difference is that the meson
> file is added for external compilation, from the SDK, while the cmake file
> is used internally in Buildroot.
> The 'problem' of using TARGET_FINALIZE_HOOKS for the meson file, is that it
> installs a 'host' file from target-finalize, which is conceptually incorrect
> and breaks the invariant that only TARGET_DIR is changed on a subsequent
> 'make' when everything was already built (i.e. only target-finalize is run).
> This can easily be fixed, by using the same hook as cmake uses, i.e.
> TOOLCHAIN_POST_INSTALL_STAGING_HOOKS.
> Note that actually even for cmake, TOOLCHAIN_POST_INSTALL_STAGING_HOOKS is
> not the best hook to install a host file. A better hook would have been
> TOOLCHAIN_POST_INSTALL_HOOKS, but this triggers only for 'host' packages,
> and 'toolchain' is treated as a 'target' package.
> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> ---
> package/meson/meson.mk | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> diff --git a/package/meson/meson.mk b/package/meson/meson.mk
> index d76541cc93..aba7382cc9 100644
> --- a/package/meson/meson.mk
> +++ b/package/meson/meson.mk
> @@ -65,6 +65,7 @@ define HOST_MESON_INSTALL_CROSS_CONF
>> $(HOST_DIR)/etc/meson/cross-compilation.conf
> endef
> -TARGET_FINALIZE_HOOKS += HOST_MESON_INSTALL_CROSS_CONF
> +TOOLCHAIN_POST_INSTALL_STAGING_HOOKS += HOST_MESON_INSTALL_CROSS_CONF
Is this then going to use the correct (final) paths for per-package
build directories?
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2019-02-26 18:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 21:11 [Buildroot] [PATCH-for-master 0/2] misc fixes for 2019.02 Thomas De Schampheleire
2019-02-25 21:11 ` [Buildroot] [PATCH-for-master 1/2] package/meson: don't install cross-compilation.conf during target-finalize Thomas De Schampheleire
2019-02-26 18:52 ` Peter Korsgaard [this message]
2019-02-26 19:48 ` Thomas De Schampheleire
2019-02-27 17:18 ` Thomas Petazzoni
2019-02-27 19:57 ` Thomas De Schampheleire
2019-03-17 15:23 ` Thomas Petazzoni
2019-03-25 9:47 ` Thomas De Schampheleire
2019-10-27 13:34 ` Arnout Vandecappelle
2019-02-25 21:11 ` [Buildroot] [PATCH-for-master 2/2] package/iproute2: backport patch to fix compilation under glibc < 2.18 Thomas De Schampheleire
2019-02-25 21:14 ` Petr Vorel
2019-02-25 21:31 ` Thomas Petazzoni
2019-03-16 21:36 ` Peter Korsgaard
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=877edmcrgf.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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