From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: Martin Kelly <mkelly@xevo.com>, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] meson: export native env only for native build
Date: Thu, 16 Nov 2017 12:14:43 +0200 [thread overview]
Message-ID: <cb3f9315-d599-4f65-59c4-7b016d0a9614@linux.intel.com> (raw)
In-Reply-To: <20171115175303.3557-2-mkelly@xevo.com>
On 11/15/2017 07:53 PM, Martin Kelly wrote:
> Although the meson crossfile should take care of setting the right cross
> environment for a target build, meson slurps any set CFLAGS, CXXFLAGS,
> LDFLAGS, and CPPFLAGS from the environment and injects them into the
> build (see mesonbuild/environment.py:get_args_from_envvars for details).
>
> This means that we are seeing native CFLAGS, CXXFLAGS, LDFLAGS, and
> CPPFLAGS in the target build, which is wrong and causes build failures
> when target and native have libraries in common (the linker gets
> confused and bails).
>
> That said, we *do* need to set certain vars for all builds so that meson
> can find the right build tools. Without this, meson will fail during its
> sanity checking step because it will determine the build tools to be
> unrunnable since they output target instead of native artifacts.
>
> The solution to all of this is to set CC, CXX, LD, and AR globally to
> the native tools while setting the other native vars *only* for the
> native build. For target builds, these vars will get overridden by the
> cross file as we expect.
Thanks; I will add this patch to my branch (so you get the credit for
it). There's still a few failures to sort first though, discovered by AB
(see Ross' email).
Alex
next prev parent reply other threads:[~2017-11-16 10:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 17:53 [PATCH 0/1] [poky-contrib] meson bugfix Martin Kelly
2017-11-15 17:53 ` [PATCH 1/1] meson: export native env only for native build Martin Kelly
2017-11-16 10:14 ` Alexander Kanavin [this message]
2017-11-16 17:52 ` Alexander Kanavin
2017-11-16 18:17 ` Martin Kelly
2017-11-15 18:02 ` ✗ patchtest: failure for meson bugfix Patchwork
2017-11-15 18:09 ` Martin Kelly
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=cb3f9315-d599-4f65-59c4-7b016d0a9614@linux.intel.com \
--to=alexander.kanavin@linux.intel.com \
--cc=mkelly@xevo.com \
--cc=openembedded-core@lists.openembedded.org \
/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