All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@intel.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH 2/2] meson: set native tools
Date: Fri,  2 Jun 2017 16:55:16 +0100	[thread overview]
Message-ID: <1496418916-17305-2-git-send-email-ross.burton@intel.com> (raw)
In-Reply-To: <1496418916-17305-1-git-send-email-ross.burton@intel.com>

When cross-compiling meson respects the usual CC, CFLAGS and so on environment
variables for *native* tools not *cross* tools, so instead of unexporting CC we
should re-export the right tools.

Not only is this the right thing to do, but recent changes to oe-core means that
the default compiler binary (cc) isn't in PATH, so Meson can't build native
binaries.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta-oe/classes/meson.bbclass | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta-oe/classes/meson.bbclass b/meta-oe/classes/meson.bbclass
index 42f4005..0cf78e4 100644
--- a/meta-oe/classes/meson.bbclass
+++ b/meta-oe/classes/meson.bbclass
@@ -9,9 +9,13 @@ do_configure[cleandirs] = "${B}"
 # Where the meson.build build configuration is
 MESON_SOURCEPATH = "${S}"
 
-# These variables in the environment override the *native* tools not the cross,
-# so they need to be unexported.
-CC[unexport] = "1"
+# These variables in the environment override the *native* tools not the cross
+CPPFLAGS = "${BUILD_CPPFLAGS}"
+CC = "${BUILD_CC}"
+CFLAGS = "${BUILD_CFLAGS}"
+CXX = "${BUILD_CXX}"
+CXXFLAGS = "${BUILD_CXXFLAGS}"
+LDFLAGS = "${BUILD_LDFLAGS}"
 
 def noprefix(var, d):
     return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
-- 
2.8.1



  reply	other threads:[~2017-06-02 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 15:55 [PATCH 1/2] meson: enable process reporting for do_compile Ross Burton
2017-06-02 15:55 ` Ross Burton [this message]
2017-06-05 11:01 ` Burton, Ross

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=1496418916-17305-2-git-send-email-ross.burton@intel.com \
    --to=ross.burton@intel.com \
    --cc=openembedded-devel@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 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.