Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v5 1/2] meson: add per package optional compiler/linker flags
Date: Tue, 23 Apr 2019 20:45:55 +0200	[thread overview]
Message-ID: <20190423204555.737a11fe@gmx.net> (raw)
In-Reply-To: <20190413184917.3b3a44eb@windsurf>

Hello Thomas,

On Sat, 13 Apr 2019 18:49:17 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello Peter,
> 
> On Mon,  8 Apr 2019 22:43:20 +0200
> Peter Seiderer <ps.report@gmx.net> wrote:
> 
> > Add LIBFOO_MESON_CFLAGS, LIBFOO_MESON_LDFLAGS and LIBFOO_MESON_CXXFLAGS
> > variables to allow per package additional compiler/linker flags.
> > 
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>  
> 
> I did a bit of research. Meson does accept -Dc_args and a bunch of
> other options on the command line, but they are ignored when a
> cross-file is used. http://mesonbuild.com/Builtin-options.html says it
> clearly: "c_args, cpp_args, c_link_args, and cpp_link_args only affect
> native builds, when cross compiling they will not be applied to
> binaries or libraries targeting the host system, only those being run
> on the build system."
> 
> There is some on-going discussion upstream about this. See
> https://github.com/mesonbuild/meson/issues/4767.
> 
> A cross_pkg_config_path option was merged:
> 
>   https://github.com/mesonbuild/meson/commit/91b2475e30d7659dad24eb35b47e4d098c716792
> 
> Aparently, they are talking about possibly adding cross_c_args.
> 
> What do we do ? Wait until upstream solves the problem ? Use an
> intermediate solution like yours, and later one move to another one if
> upstream provides one ?

Use the per package cross-compilation.conf with the enhanced flags setting
solution ;-), maybe it is the canonical solution because the compiler etc.
binaries and other settings for cross compile are already given via this
config file, why not all other settings (maybe unfamiliar for long term
autotools users, used to the 'easy' (1) way of quick overwrite some compile
flags/parameters)? 

> 
> Could you at least raise the fact that the Buildroot project would also
> be interested in being able to pass addition cflags/cxxflags/ldflags on
> the command line, as well as passing the path of tools like
> libgcrypt-config ? (See my reply to J?rg Krause's patch on this topic,
> on which you are Cc'ed).

O.k., will try to give some input on the upstream discussion...

Regards,
Peter

(1) maybe newbies would call it magic

> 
> Best regards,
> 
> Thomas

  reply	other threads:[~2019-04-23 18:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 20:43 [Buildroot] [PATCH v5 1/2] meson: add per package optional compiler/linker flags Peter Seiderer
2019-04-08 20:43 ` [Buildroot] [PATCH v5 2/2] libdrm: change to meson build system Peter Seiderer
2019-04-13 16:49 ` [Buildroot] [PATCH v5 1/2] meson: add per package optional compiler/linker flags Thomas Petazzoni
2019-04-23 18:45   ` Peter Seiderer [this message]
2019-05-01 21:03     ` Peter Seiderer

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=20190423204555.737a11fe@gmx.net \
    --to=ps.report@gmx.net \
    --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