From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by mail.openembedded.org (Postfix) with ESMTP id 2BC4E78F72 for ; Fri, 27 Dec 2019 12:03:17 +0000 (UTC) IronPort-SDR: jjX0uPV+j0c3/VUD61dcTEBbkWjnrEKhfOcIMkNFW/pxGaxp/vUs9Ke/L+N5vPjGs4o7PNQiZO azVfonqeV1a1B3fFA9XAZE6i5+0jNQdzzRJVV0QNbR2a1iVqWJfCXYW80DXPV58LvZpEtU5PbP u5eSRxX//ud/ygpW/r+6KKSNHihjAQTFNRs17I+lJCLquTVGw3Nzg0bHYgs7cdrE4a3ry9VGiI YOZ9upuXMUaIzH+iJIVVIhXaBw2JN5oYsP4j5q5Esqnn5Kmyidiehy7FYFTlVfuE7syOljwHWd BIQ= X-IronPort-AV: E=Sophos;i="5.69,362,1571695200"; d="scan'208,217";a="3935657" From: Peter Kjellerstedt To: fdk17 , "openembedded-core@lists.openembedded.org" Thread-Topic: [OE-core] [meson][PATCH] meson: Allow for llvm-native tools to be used Thread-Index: AQHVuxpeRzmGlCqj10qPmyuvi0ABiqfN4z2A Date: Fri, 27 Dec 2019 12:03:17 +0000 Message-ID: <54a01022886647f9baa8608f8a6af5b1@XBOX03.axis.com> References: <1758bd87-e492-46bc-8aaa-514e802c5030@www.fastmail.com> In-Reply-To: <1758bd87-e492-46bc-8aaa-514e802c5030@www.fastmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.0.5.60] MIME-Version: 1.0 Subject: Re: [meson][PATCH] meson: Allow for llvm-native tools to be used X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 12:03:18 -0000 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_54a01022886647f9baa8608f8a6af5b1XBOX03axiscom_" --_000_54a01022886647f9baa8608f8a6af5b1XBOX03axiscom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable If we're adding a --native-file, shouldn't it always be specified, regardle= ss 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, CXXFLAG= S and LDFLAGS). //Peter From: 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 wer= e available for use on the host. These libraries are then used by a host/sdk tool to prepare binary files fo= r use by an application on the target. When building our tool using meson it wasn't able to find the Yocto built L= LLVM libraries. This fixes the issue so meson uses the correct llvm-config tool. Author: Fred Baksik > Date: Tue Dec 24 20:38:47 2019 -0500 meson: Allow for llvm-native tools to be used Signed-off-by: Fred Baksik > 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 =3D " ${PACKAGECONFIG_CONFARGS}" MESON_CROSS_FILE =3D "" MESON_CROSS_FILE_class-target =3D "--cross-file ${WORKDIR}/meson.cross" MESON_CROSS_FILE_class-nativesdk =3D "--cross-file ${WORKDIR}/meson.cross" +MESON_CROSS_FILE_class-native =3D "--native-file ${WORKDIR}/meson.native" def meson_array(var, d): items =3D d.getVar(var).split() @@ -110,6 +111,14 @@ endian =3D '${@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 <

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 ove= rride_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 <openembedd= ed-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 tha= t 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 tool= s to be used

   

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

 

diff --git a/meta/classes/meson.bbclass b/meta/class= es/meson.bbclass

index e1a13bbbf7..b5cd2ee8c4 100644

--- a/meta/classes/meson.bbclass

+++ b/meta/classes/meson.bbclass

@@ -33,6 +33,7 @@ EXTRA_OEMESON_append =3D "= ; ${PACKAGECONFIG_CONFARGS}"

 MESON_CROSS_FILE =3D ""

 MESON_CROSS_FILE_class-target =3D "--cros= s-file ${WORKDIR}/meson.cross"

 MESON_CROSS_FILE_class-nativesdk =3D "--c= ross-file ${WORKDIR}/meson.cross"

+MESON_CROSS_FILE_class-native =3D "--nativ= e-file ${WORKDIR}/meson.native"

 

 def meson_array(var, d):

     items =3D d.getVar(var).spl= it()

@@ -110,6 +111,14 @@ endian =3D '${@meson_endian= ('TARGET', d)}'

 EOF

 }

 

+do_write_config_class-native() {

+    # This needs to be Py to spl= it the args into single-element lists

+    cat >${WORKDIR}/meson.nat= ive <<EOF

+[binaries]

+llvm-config =3D 'llvm-config${LLVMVERSION}'

+EOF

+}

+

 CONFIGURE_FILES =3D "meson.build"

 

 meson_do_configure() {

--_000_54a01022886647f9baa8608f8a6af5b1XBOX03axiscom_--