All of lore.kernel.org
 help / color / mirror / Atom feed
* [meson][PATCH] meson: Allow for llvm-native tools to be used
@ 2019-12-25 11:49 fdk17
  2019-12-25 12:02 ` ✗ patchtest: failure for " Patchwork
  2019-12-27 12:03 ` [meson][PATCH] " Peter Kjellerstedt
  0 siblings, 2 replies; 7+ messages in thread
From: fdk17 @ 2019-12-25 11:49 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]

I created a bbappend to build the LLVM recipe so that all the libraries were available for use on the host.
These libraries are then used by a host/sdk tool to prepare binary files for use by an application on the target.
When building our tool using meson it wasn't able to find the Yocto built LLLVM libraries.
This fixes the issue so meson uses the correct llvm-config tool.

Author: Fred Baksik <fred.baksik@mrcy.com>
Date: Tue Dec 24 20:38:47 2019 -0500

 meson: Allow for llvm-native tools to be used

 Signed-off-by: Fred Baksik <fred.baksik@mrcy.com>

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index e1a13bbbf7..b5cd2ee8c4 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -33,6 +33,7 @@ EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"
 MESON_CROSS_FILE = ""
 MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
 MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
+MESON_CROSS_FILE_class-native = "--native-file ${WORKDIR}/meson.native"

 def meson_array(var, d):
 items = d.getVar(var).split()
@@ -110,6 +111,14 @@ endian = '${@meson_endian('TARGET', d)}'
 EOF
 }

+do_write_config_class-native() {
+ # This needs to be Py to split the args into single-element lists
+ cat >${WORKDIR}/meson.native <<EOF
+[binaries]
+llvm-config = 'llvm-config${LLVMVERSION}'
+EOF
+}
+
 CONFIGURE_FILES = "meson.build"

 meson_do_configure() {

[-- Attachment #2: Type: text/html, Size: 2407 bytes --]

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

* ✗ patchtest: failure for meson: Allow for llvm-native tools to be used
  2019-12-25 11:49 [meson][PATCH] meson: Allow for llvm-native tools to be used fdk17
@ 2019-12-25 12:02 ` Patchwork
  2019-12-27 12:03 ` [meson][PATCH] " Peter Kjellerstedt
  1 sibling, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-12-25 12:02 UTC (permalink / raw)
  To: fdk17; +Cc: openembedded-core

== Series Details ==

Series: meson: Allow for llvm-native tools to be used
Revision: 1
URL   : https://patchwork.openembedded.org/series/21757/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at d6c62cc030)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* Re: [meson][PATCH] meson: Allow for llvm-native tools to be used
  2019-12-25 11:49 [meson][PATCH] meson: Allow for llvm-native tools to be used fdk17
  2019-12-25 12:02 ` ✗ patchtest: failure for " Patchwork
@ 2019-12-27 12:03 ` Peter Kjellerstedt
  2019-12-27 14:25   ` fdk17
  2020-01-02 17:28   ` Ross Burton
  1 sibling, 2 replies; 7+ messages in thread
From: Peter Kjellerstedt @ 2019-12-27 12:03 UTC (permalink / raw)
  To: fdk17, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2188 bytes --]

If we're adding a --native-file, shouldn't it always be specified, regardless of --cross-file?
Also, it looks as most of what is currently done in override_native_tools() and meson_do_configure_prepend_class-native() could be moved to the native-file (the exception seems to be the unsetting of CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS).

//Peter

From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-bounces@lists.openembedded.org> On Behalf Of fdk17
Sent: den 25 december 2019 12:49
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [meson][PATCH] meson: Allow for llvm-native tools to be used

I created a bbappend to build the LLVM recipe so that all the libraries were available for use on the host.
These libraries are then used by a host/sdk tool to prepare binary files for use by an application on the target.
When building our tool using meson it wasn't able to find the Yocto built LLLVM libraries.
This fixes the issue so meson uses the correct llvm-config tool.

Author: Fred Baksik <fred.baksik@mrcy.com<mailto:fred.baksik@mrcy.com>>
Date:   Tue Dec 24 20:38:47 2019 -0500

    meson: Allow for llvm-native tools to be used

    Signed-off-by: Fred Baksik <fred.baksik@mrcy.com<mailto:fred.baksik@mrcy.com>>

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index e1a13bbbf7..b5cd2ee8c4 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -33,6 +33,7 @@ EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"
 MESON_CROSS_FILE = ""
 MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
 MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
+MESON_CROSS_FILE_class-native = "--native-file ${WORKDIR}/meson.native"

 def meson_array(var, d):
     items = d.getVar(var).split()
@@ -110,6 +111,14 @@ endian = '${@meson_endian('TARGET', d)}'
 EOF
 }

+do_write_config_class-native() {
+    # This needs to be Py to split the args into single-element lists
+    cat >${WORKDIR}/meson.native <<EOF
+[binaries]
+llvm-config = 'llvm-config${LLVMVERSION}'
+EOF
+}
+
 CONFIGURE_FILES = "meson.build"

 meson_do_configure() {

[-- Attachment #2: Type: text/html, Size: 7522 bytes --]

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

* Re: [meson][PATCH] meson: Allow for llvm-native tools to be used
  2019-12-27 12:03 ` [meson][PATCH] " Peter Kjellerstedt
@ 2019-12-27 14:25   ` fdk17
  2019-12-27 14:30     ` Fred Baksik
  2020-01-02 17:28   ` Ross Burton
  1 sibling, 1 reply; 7+ messages in thread
From: fdk17 @ 2019-12-27 14:25 UTC (permalink / raw)
  To: openembedded-core



On Fri, Dec 27, 2019, at 7:03 AM, Peter Kjellerstedt wrote:
> If we’re adding a --native-file, shouldn’t it always be specified, regardless of --cross-file?

I don't think so.  It seems to me that it should be one or the other.  If you are building a -native package then you don't need a native file and vice versa. 

> Also, it looks as most of what is currently done in override_native_tools() and meson_do_configure_prepend_class-native() could be moved to the native-file (the exception seems to be the unsetting of CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS).

It could be but I didn't want to make unnecessary changes just to get llvm-native working.  I think few  people  even attempt to use a native-llvm for anything other than building llvm.  If anyone else needed this I would think that the  llvm-native recipe would have been updated by now by others.  In that regards this patch just not important.  I was just putting it out there as this tripped me up for a few hours before understanding what was happening.


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

* Re: [meson][PATCH] meson: Allow for llvm-native tools to be used
  2019-12-27 14:25   ` fdk17
@ 2019-12-27 14:30     ` Fred Baksik
  0 siblings, 0 replies; 7+ messages in thread
From: Fred Baksik @ 2019-12-27 14:30 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]



On Fri, Dec 27, 2019, at 9:25 AM, fdk17 wrote:
> 
> 
> On Fri, Dec 27, 2019, at 7:03 AM, Peter Kjellerstedt wrote:
> > If we’re adding a --native-file, shouldn’t it always be specified, regardless of --cross-file?
> 
> I don't think so. It seems to me that it should be one or the other. If you are building a -native package then you don't need a native file and vice versa. 
> 

Sorry I meant to write: If you are building a -native package then you don't need a cross file and vice versa. 

I guess this change is not needed unless you have the updates to build a full llvm-native install. Those changes probably should be part of this. If there is any interest then I could make a new version for a working llvm-native with meson patch. 

--
fdk17

[-- Attachment #2: Type: text/html, Size: 1223 bytes --]

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

* Re: [meson][PATCH] meson: Allow for llvm-native tools to be used
  2019-12-27 12:03 ` [meson][PATCH] " Peter Kjellerstedt
  2019-12-27 14:25   ` fdk17
@ 2020-01-02 17:28   ` Ross Burton
  1 sibling, 0 replies; 7+ messages in thread
From: Ross Burton @ 2020-01-02 17:28 UTC (permalink / raw)
  To: openembedded-core

On 27/12/2019 12:03, Peter Kjellerstedt wrote:
> If we’re adding a --native-file, shouldn’t it always be specified, 
> regardless of --cross-file?
> 
> Also, it looks as most of what is currently done in 
> override_native_tools() and meson_do_configure_prepend_class-native() 
> could be moved to the native-file (the exception seems to be the 
> unsetting of CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS).

Right, I've had a mental TODO for this for some time but haven't got 
around to it.

Ross



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

* [meson][PATCH] meson: Allow for llvm-native tools to be used
@ 2019-12-25 11:24 fdk17
  0 siblings, 0 replies; 7+ messages in thread
From: fdk17 @ 2019-12-25 11:24 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]

I created a bbappend to build the LLVM recipe so that all the libraries were available for use on the host.
These libraries are then used by a host/sdk tool to prepare binary files for use by an application on the target.
When building our tool using meson it wasn't able to find the Yocto built LLLVM libraries.
This fixes the issue so meson uses the correct llvm-config tool.

Author: Fred Baksik <fred.baksik@mrcy.com>
Date:   Tue Dec 24 20:38:47 2019 -0500

meson: Allow for llvm-native tools to be used

Signed-off-by: Fred Baksik <fred.baksik@mrcy.com>

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index e1a13bbbf7..b5cd2ee8c4 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -33,6 +33,7 @@ EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"
MESON_CROSS_FILE = ""
MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
+MESON_CROSS_FILE_class-native = "--native-file ${WORKDIR}/meson.native"

def meson_array(var, d):
items = d.getVar(var).split()
@@ -110,6 +111,14 @@ endian = '${@meson_endian('TARGET', d)}'
EOF
}

+do_write_config_class-native() {
+    # This needs to be Py to split the args into single-element lists
+    cat >${WORKDIR}/meson.native <<EOF
+[binaries]
+llvm-config = 'llvm-config${LLVMVERSION}'
+EOF
+}
+
CONFIGURE_FILES = "meson.build"

meson_do_configure() {

[-- Attachment #2: Type: text/html, Size: 1830 bytes --]

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

end of thread, other threads:[~2020-01-02 17:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25 11:49 [meson][PATCH] meson: Allow for llvm-native tools to be used fdk17
2019-12-25 12:02 ` ✗ patchtest: failure for " Patchwork
2019-12-27 12:03 ` [meson][PATCH] " Peter Kjellerstedt
2019-12-27 14:25   ` fdk17
2019-12-27 14:30     ` Fred Baksik
2020-01-02 17:28   ` Ross Burton
  -- strict thread matches above, loose matches on Subject: below --
2019-12-25 11:24 fdk17

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.