From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv2] meson: add per package optional compiler/linker flags
Date: Sun, 23 Jun 2019 12:36:14 +0200 [thread overview]
Message-ID: <20190623123614.677b10fd@windsurf> (raw)
In-Reply-To: <20190622202046.21817-1-yann.morin.1998@free.fr>
Hello Yann,
Thanks for respining. One question below.
On Sat, 22 Jun 2019 22:20:46 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
Perhaps the commit should explain that as of today, Meson doesn't allow
to pass cflags/ldflags on the command line when a cross-compilation
file is used.
> Add LIBFOO_CFLAGS, LIBFOO_LDFLAGS and LIBFOO_CXXFLAGS variables to allow
> packages to provide their own flags, possibly overriding the generic
> ones entirely, like we allow for other infras.
>
> This means that the meson infra is the first and only infra for which
> FOO_CFLAGS, FOO_LDFLAGS, and FOOO_CXXFLAGS are meaningful, while for the
> other infras, they are just variable private to the package itself.
> Instead of naming those variables after the meson infra (e.g.
> LIBFOO_MESON_CFLAGS), we name them with a generic name, as mayb, just
mayb -> maybe
> maybe, we could also change the ither infras to also recognise those
ither -> other
> variables.
>
> To mimic this feature for packages that are bui9lt from the SDK, we also
built
> install a templatised version of cross-compilation.conf, with three new
> placeholders for custom flags. If a user wants to buidl a package that
build
> needs custom flags, they can use that template to generate a per-pacakge
package
> +* +FOO_CFLAGS+, to specify compiler arguments added to the package specific
> + +cross-compile.conf+ file +c_args+ property. By default, empty, so that
> + the global +TARGET_CFLAGS+ are used.
I find the wording "By default, empty, so that the global
+TARGET_CFLAGS+ are used" very confusing. Indeed, by default, those
variables are not empty, they are precisely defined to TARGET_CFLAGS.
For example, in the autotools infra documentation, we say:
* +LIBFOO_AUTORECONF+, tells whether the package should
be autoreconfigured or not (i.e. if the configure script and
Makefile.in files should be re-generated by re-running autoconf,
automake, libtool, etc.). Valid values are +YES+ and
+NO+. By default, the value is +NO+
So we just say that the default value is NO, not that it is empty and
that NO is used :)
For extra clarity, it could be rephrased like this:
When no value is specified by the package for this variable,
the value of +TARGET_CFLAGS+ will be used by the
+meson-package+ infrastructure.
If you agree with this change, I can fix that up when applying.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-06-23 10:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-22 20:20 [Buildroot] [PATCHv2] meson: add per package optional compiler/linker flags Yann E. MORIN
2019-06-23 10:36 ` Thomas Petazzoni [this message]
2019-06-23 15:24 ` Yann E. MORIN
2019-06-23 19:21 ` Yann E. MORIN
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=20190623123614.677b10fd@windsurf \
--to=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.