From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Guillaume W. Bres" <guillaume.bressaix@gmail.com>
Cc: buildroot@busybox.net, Yann Morin <yann.morin.1998@free.fr>
Subject: Re: [Buildroot] [RFC 1/1] package/pkg-meson.mk: handle possibly non existing compilers
Date: Tue, 16 Aug 2022 12:01:09 +0200 [thread overview]
Message-ID: <20220816120109.1a348d39@windsurf> (raw)
In-Reply-To: <20220816094829.377-1-guillaume.bressaix@gmail.com>
On Tue, 16 Aug 2022 11:48:29 +0200
"Guillaume W. Bres" <guillaume.bressaix@gmail.com> wrote:
> To avoid populating the cross-file with non existing compilers,
> we tie them to /bin/false
>
> Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
> ---
> I only managed the CXX and FC case,
> assuming all the other ones are always there ?
> ---
> package/pkg-meson.mk | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
> index 0632ab21cf..f246a126d1 100644
> --- a/package/pkg-meson.mk
> +++ b/package/pkg-meson.mk
> @@ -68,15 +68,29 @@ else
> PKG_MESON_TARGET_CPU_FAMILY = $(ARCH)
> endif
>
> +# To avoid populating the cross-file with non existing compilers,
> +# we tie them to /bin/false
> +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_CXX),y)
This is not correct as this boolean only makes sense when using an
internal toolchain. You should use BR2_INSTALL_LIBSTDCPP (yes, I know
the name is crappy, but it's historical).
> +PKG_MESON_TARGET_CXX = $(TARGET_CXX)
> +else
> +PKG_MESON_TARGET_CXX = /bin/false
> +endif
> +
> +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y)
This should be BR2_TOOLCHAIN_HAS_FORTRAN
> +PKG_MESON_TARGET_FC = $(TARGET_FC)
> +else
> +PKG_MESON_TARGET_FC = /bin/false
> +endif
Now, the annoying question: should this be done in pkg-meson.mk, or
should we do it more globally, i.e define TARGET_CXX and TARGET_FC to
correct values only when C++ or Fortran are supported.
Yann, what do you think? Did we ever try to have TARGET_CXX=/bin/false
and TARGET_FC=/bin/false when there is no C++/Fortran support?
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-08-16 10:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 9:48 [Buildroot] [RFC 1/1] package/pkg-meson.mk: handle possibly non existing compilers Guillaume W. Bres
2022-08-16 10:01 ` Thomas Petazzoni via buildroot [this message]
2022-08-16 10:12 ` yann.morin
2022-08-16 11:53 ` Thomas Petazzoni via buildroot
2022-08-16 12:04 ` yann.morin
2022-08-16 12:53 ` Guillaume Bres
2022-08-16 20:59 ` Arnout Vandecappelle
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=20220816120109.1a348d39@windsurf \
--to=buildroot@buildroot.org \
--cc=buildroot@busybox.net \
--cc=guillaume.bressaix@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/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