From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/4] infra/pkg-meson: allow packages to pass custom compiler/linker flags
Date: Sun, 30 Jun 2019 18:32:51 +0200 [thread overview]
Message-ID: <20190630163251.GA3606@scaer> (raw)
In-Reply-To: <09229b6e-31fd-bf51-bd5d-060c9b87c477@mind.be>
On 2019-06-30 18:12 +0200, Arnout Vandecappelle spake thusly:
> Hi Yann,
>
> On 24/06/2019 22:25, Yann E. MORIN wrote:
> [snip]
> > +$(2)_MESON_SED_CFLAGS = $$(if $$(strip $$($(2)_CFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_CFLAGS)`)
> > +$(2)_MESON_SED_LDFLAGS = $$(if $$(strip $$($(2)_LDFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_LDFLAGS)`)
> > +$(2)_MESON_SED_CXXFLAGS = $$(if $$(strip $$($(2)_CXXFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_CXXFLAGS)`)
>
> This is ridiculous - why not the much simpler make construct
Look, I know I do a lot of crap, granted, but your often calling things
"ridiculous" or "bullshit" or other nasty qualifiers is starting to be
a little bit unnerving...
> -e "s%@TARGET_CFLAGS@%$$(foreach flag,$$($(2)_CFLAGS),"$$(flag)"$(comma))%g" \
Because it does not work as you think it works?
Consider the following:
FOO_CFLAGS = -DMEH='foo bar' -DBLEH="buz baz"
I'll leave it up to you to think what it gives in either case...
> Note that this would also fix the issue from patch 1. Obviously untested,
> because that's just the kind of person I am :-). If it does need to be a little
> bit complicated, then I'd still prefer it to be managed by a macro rather than
> defining additional variables for each kind of flag. E.g. quoted-comma-list.
>
> Then again, this is the way it's already done in meson.mk, so why not. Maybe
> something to fix in a follow-up patch.
Nope, there is nothing to fix.
If there were anything to fix, that would have been the commit log of
5cd8afbd, which failed to explain this pecularity.
> If you haven't sent a v2 that applies this technique by the next time I'm
> applying stuff, I'll apply it as is.
I will definitely *not* send a v2.
Regards,
Yann E. MORIN.
> Regards,
> Arnout
>
>
> > +
> > # Configure package for target
> > #
> > #
> > @@ -67,9 +75,9 @@ define $(2)_CONFIGURE_CMDS
> > -e "s%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g" \
> > -e "s%@TARGET_CPU@%$$(GCC_TARGET_CPU)%g" \
> > -e "s%@TARGET_ENDIAN@%$$(call LOWERCASE,$$(BR2_ENDIAN))%g" \
> > - -e "s%@TARGET_CFLAGS@%$$(HOST_MESON_SED_CFLAGS)%g" \
> > - -e "s%@TARGET_LDFLAGS@%$$(HOST_MESON_SED_LDFLAGS)%g" \
> > - -e "s%@TARGET_CXXFLAGS@%$$(HOST_MESON_SED_CXXFLAGS)%g" \
> > + -e "s%@TARGET_CFLAGS@%$$($(2)_MESON_SED_CFLAGS)%g" \
> > + -e "s%@TARGET_LDFLAGS@%$$($(2)_MESON_SED_LDFLAGS)%g" \
> > + -e "s%@TARGET_CXXFLAGS@%$$($(2)_MESON_SED_CXXFLAGS)%g" \
> > -e "s%@HOST_DIR@%$$(HOST_DIR)%g" \
> > package/meson/cross-compilation.conf.in \
> > > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
> >
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2019-06-30 16:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 20:25 [Buildroot] [PATCH 0/4] libglib: fix build with NLS or in Thumb mode (branch yem/meson-per-pkg-flags) Yann E. MORIN
2019-06-24 20:25 ` [Buildroot] [PATCH 1/4] package/meson: fix empty arguments in cross-compilation.conf Yann E. MORIN
2019-06-24 20:25 ` [Buildroot] [PATCH 2/4] infra/pkg-meson: allow packages to pass custom compiler/linker flags Yann E. MORIN
2019-06-25 20:28 ` Peter Seiderer
2019-06-30 16:12 ` Arnout Vandecappelle
2019-06-30 16:32 ` Yann E. MORIN [this message]
2019-07-01 8:11 ` Arnout Vandecappelle
2019-07-01 8:12 ` Arnout Vandecappelle
2019-06-24 20:25 ` [Buildroot] [PATCH 3/4] package/libglib2: fix NLS build on musl and uclibc Yann E. MORIN
2019-07-01 8:13 ` Arnout Vandecappelle
2019-06-24 20:25 ` [Buildroot] [PATCH 4/4] package/libglib2: fix build on ARM in Thumb mode Yann E. MORIN
2019-07-01 8:06 ` [Buildroot] [PATCH 0/4] libglib: fix build with NLS or in Thumb mode (branch yem/meson-per-pkg-flags) 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=20190630163251.GA3606@scaer \
--to=yann.morin.1998@free.fr \
--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