All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] meson: enable process reporting for do_compile
@ 2017-06-02 15:55 Ross Burton
  2017-06-02 15:55 ` [PATCH 2/2] meson: set native tools Ross Burton
  2017-06-05 11:01 ` [PATCH 1/2] meson: enable process reporting for do_compile Burton, Ross
  0 siblings, 2 replies; 3+ messages in thread
From: Ross Burton @ 2017-06-02 15:55 UTC (permalink / raw)
  To: openembedded-devel

Ninja outputs progress information during a build (for example [12/34]) so we
can tell bitbake how to parse this.

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

diff --git a/meta-oe/classes/meson.bbclass b/meta-oe/classes/meson.bbclass
index 5a04134..42f4005 100644
--- a/meta-oe/classes/meson.bbclass
+++ b/meta-oe/classes/meson.bbclass
@@ -75,6 +75,7 @@ meson_do_configure() {
     fi
 }
 
+do_compile[progress] = "outof:^\[(\d+)/(\d+)\]"
 meson_do_compile() {
     ninja ${PARALLEL_MAKE}
 }
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] meson: set native tools
  2017-06-02 15:55 [PATCH 1/2] meson: enable process reporting for do_compile Ross Burton
@ 2017-06-02 15:55 ` Ross Burton
  2017-06-05 11:01 ` [PATCH 1/2] meson: enable process reporting for do_compile Burton, Ross
  1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2017-06-02 15:55 UTC (permalink / raw)
  To: openembedded-devel

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] meson: enable process reporting for do_compile
  2017-06-02 15:55 [PATCH 1/2] meson: enable process reporting for do_compile Ross Burton
  2017-06-02 15:55 ` [PATCH 2/2] meson: set native tools Ross Burton
@ 2017-06-05 11:01 ` Burton, Ross
  1 sibling, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2017-06-05 11:01 UTC (permalink / raw)
  To: OpenEmbedded Devel List

Just realised that my local master was out of date and these don't apply
anymore, I'll rebase and resend.

Ross

On 2 June 2017 at 16:55, Ross Burton <ross.burton@intel.com> wrote:

> Ninja outputs progress information during a build (for example [12/34]) so
> we
> can tell bitbake how to parse this.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta-oe/classes/meson.bbclass | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta-oe/classes/meson.bbclass b/meta-oe/classes/meson.bbclass
> index 5a04134..42f4005 100644
> --- a/meta-oe/classes/meson.bbclass
> +++ b/meta-oe/classes/meson.bbclass
> @@ -75,6 +75,7 @@ meson_do_configure() {
>      fi
>  }
>
> +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]"
>  meson_do_compile() {
>      ninja ${PARALLEL_MAKE}
>  }
> --
> 2.8.1
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-05 11:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02 15:55 [PATCH 1/2] meson: enable process reporting for do_compile Ross Burton
2017-06-02 15:55 ` [PATCH 2/2] meson: set native tools Ross Burton
2017-06-05 11:01 ` [PATCH 1/2] meson: enable process reporting for do_compile Burton, Ross

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.