[oe,2/2] meson: set native tools

Message ID 1496418916-17305-2-git-send-email-ross.burton@intel.com
State New
Headers show
  • [oe,1/2] meson: enable process reporting for do_compile
Related show

Commit Message

Ross Burton June 2, 2017, 3:55 p.m.
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

Signed-off-by: Ross Burton <ross.burton@intel.com>

 meta-oe/classes/meson.bbclass | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)


Openembedded-devel mailing list


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
-# 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
+CC = "${BUILD_CC}"
 def noprefix(var, d):
     return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)