openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] meson: fix environmemt files in SDK
@ 2021-10-12 10:12 Hsia-Jun Li
  2021-10-12 10:12 ` [PATCH 1/2] meson: move lang args to the right section Hsia-Jun Li
  2021-10-12 10:12 ` [PATCH 2/2] [WIP]: meson: install native file in sdk Hsia-Jun Li
  0 siblings, 2 replies; 5+ messages in thread
From: Hsia-Jun Li @ 2021-10-12 10:12 UTC (permalink / raw)
  To: openembedded-core; +Cc: alex.kanavin, Hsia-Jun(Randy) Li

From: "Hsia-Jun(Randy) Li" <randy.li@synaptics.com>

I have not verified the second patch yet because I don't
have cable network at home. And I don't really like the
way to compose that native file, I wish there is a
better way to do that.

Hsia-Jun(Randy) Li (1):
  [WIP]: meson: install native file in sdk

Randy Li (1):
  meson: move lang args to the right section

 meta/classes/meson-routines.bbclass           |  4 ++
 .../meson/meson/meson-setup.py                |  2 +
 .../meson/meson/meson-wrapper                 |  1 +
 .../meson/nativesdk-meson_0.59.1.bb           | 44 ++++++++++++++++++-
 4 files changed, 49 insertions(+), 2 deletions(-)

-- 
2.17.1



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

* [PATCH 1/2] meson: move lang args to the right section
  2021-10-12 10:12 [PATCH 0/2] meson: fix environmemt files in SDK Hsia-Jun Li
@ 2021-10-12 10:12 ` Hsia-Jun Li
  2021-10-12 10:12 ` [PATCH 2/2] [WIP]: meson: install native file in sdk Hsia-Jun Li
  1 sibling, 0 replies; 5+ messages in thread
From: Hsia-Jun Li @ 2021-10-12 10:12 UTC (permalink / raw)
  To: openembedded-core; +Cc: alex.kanavin, Randy Li, Hsia-Jun Li

From: Randy Li <ayaka@soulik.info>

After meson 0.56.0, <lang>_args and <lang>_link_args would be
regarded as meson built-in options.

Signed-off-by: Hsia-Jun(Randy) Li <randy.li@synaptics.com>
---
 meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
index 0e76cc78f8..5657397ddc 100644
--- a/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
@@ -24,12 +24,14 @@ nm = @NM
 strip = @STRIP
 pkgconfig = 'pkg-config'
 
-[properties]
-needs_exe_wrapper = true
+[built-in options]
 c_args = @CFLAGS
 c_link_args = @LDFLAGS
 cpp_args = @CPPFLAGS
 cpp_link_args = @LDFLAGS
+
+[properties]
+needs_exe_wrapper = true
 sys_root = @OECORE_TARGET_SYSROOT
 
 [host_machine]
-- 
2.17.1



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

* [PATCH 2/2] [WIP]: meson: install native file in sdk
  2021-10-12 10:12 [PATCH 0/2] meson: fix environmemt files in SDK Hsia-Jun Li
  2021-10-12 10:12 ` [PATCH 1/2] meson: move lang args to the right section Hsia-Jun Li
@ 2021-10-12 10:12 ` Hsia-Jun Li
  2021-10-12 10:49   ` Alexander Kanavin
  1 sibling, 1 reply; 5+ messages in thread
From: Hsia-Jun Li @ 2021-10-12 10:12 UTC (permalink / raw)
  To: openembedded-core; +Cc: alex.kanavin, Hsia-Jun(Randy) Li

From: "Hsia-Jun(Randy) Li" <randy.li@synaptics.com>

Without a native environment file, find_program() can't
locate the native program inside SDK.

That stops wayland compositor using wayland scanner.

Signed-off-by: Hsia-Jun(Randy) Li <randy.li@synaptics.com>
---
 meta/classes/meson-routines.bbclass           |  4 ++
 .../meson/meson/meson-setup.py                |  2 +
 .../meson/meson/meson-wrapper                 |  1 +
 .../meson/nativesdk-meson_0.59.1.bb           | 38 +++++++++++++++++++
 4 files changed, 45 insertions(+)

diff --git a/meta/classes/meson-routines.bbclass b/meta/classes/meson-routines.bbclass
index be3aeedeba..a74a9916d8 100644
--- a/meta/classes/meson-routines.bbclass
+++ b/meta/classes/meson-routines.bbclass
@@ -4,6 +4,10 @@ def meson_array(var, d):
     items = d.getVar(var).split()
     return repr(items[0] if len(items) == 1 else items)
 
+def meson_list_str(var, d):
+    items = d.getVar(var).split()
+    return repr(items[0]) if len(items) == 1 else ', '.join(repr(s) for s in items)
+
 # Map our ARCH values to what Meson expects:
 # http://mesonbuild.com/Reference-tables.html#cpu-families
 def meson_cpu_family(var, d):
diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py b/meta/recipes-devtools/meson/meson/meson-setup.py
index 7ac4e3ad47..4a0a967fef 100755
--- a/meta/recipes-devtools/meson/meson/meson-setup.py
+++ b/meta/recipes-devtools/meson/meson/meson-setup.py
@@ -27,6 +27,8 @@ except KeyError:
 
 template_file = os.path.join(sysroot, 'usr/share/meson/meson.cross.template')
 cross_file = os.path.join(sysroot, 'usr/share/meson/%smeson.cross' % os.environ["TARGET_PREFIX"])
+native_template_file = os.path.join(sysroot, 'usr/share/meson/meson.native.template')
+native_file = os.path.join(sysroot, 'usr/share/meson/meson.native')
 
 with open(template_file) as in_file:
     template = in_file.read()
diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper
index d4ffe60f9a..d4b5187f8d 100755
--- a/meta/recipes-devtools/meson/meson/meson-wrapper
+++ b/meta/recipes-devtools/meson/meson/meson-wrapper
@@ -11,4 +11,5 @@ unset CC CXX CPP LD AR NM STRIP
 
 exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
      --cross-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \
+     --native-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/meson.native" \
      "$@"
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
index 5657397ddc..f537204a2d 100644
--- a/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
@@ -15,6 +15,44 @@ SRC_URI += "file://meson-setup.py \
 #   them.
 do_install:append() {
     install -d ${D}${datadir}/meson
+
+    cat >${D}${datadir}/meson/meson.native.template <<EOF
+[binaries]
+c = ${@meson_array('BUILD_CC', d)}
+cpp = ${@meson_array('BUILD_CXX', d)}
+ar = ${@meson_array('BUILD_AR', d)}
+nm = ${@meson_array('BUILD_NM', d)}
+strip = ${@meson_array('BUILD_STRIP', d)}
+readelf = ${@meson_array('BUILD_READELF', d)}
+pkgconfig = 'pkg-config-native'
+
+[built-in options]
+c_args = ['-isystem' @OECORE_NATIVE_SYSROOT '${includedir_native}' , ${@meson_list_str('BUILD_OPTIMIZATION', d)}]
+c_link_args = ['-L' @OECORE_NATIVE_SYSROOT '${libdir_native}',
+               '-L' @@OECORE_NATIVE_SYSROOT '${base_libdir_native}',
+               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT '${libdir_native}',
+               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT '${base_libdir_native}',
+               '-Wl,--allow-shlib-undefined',
+               '-Wl,--dynamic-linker=' @OECORE_NATIVE_SYSROOT '${base_libdir_native}'
+               '${@bb.utils.contains('BUILD_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', '', d)}
+                ${@bb.utils.contains('BUILD_ARCH', 'i686', 'ld-linux.so.2', '', d)}
+                ${@bb.utils.contains('BUILD_ARCH', 'aarch64', 'ld-linux-aarch64.so.1', '', d)}'
+]
+cpp_args = ['-isystem@OECORE_NATIVE_SYSROOT' 'usr/include', ${@meson_list_str('BUILD_OPTIMIZATION', d)}]
+cpp_link_args = ['-L' @OECORE_NATIVE_SYSROOT '${libdir_native}',
+               '-L' @@OECORE_NATIVE_SYSROOT '${base_libdir_native}',
+               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT '${libdir_native}',
+               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT '${base_libdir_native}',
+               '-Wl,--allow-shlib-undefined',
+               '-Wl,--dynamic-linker=' @OECORE_NATIVE_SYSROOT '${base_libdir_native}'
+               '${@bb.utils.contains('BUILD_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', '', d)}
+                ${@bb.utils.contains('BUILD_ARCH', 'i686', 'ld-linux.so.2', '', d)}
+                ${@bb.utils.contains('BUILD_ARCH', 'aarch64', 'ld-linux-aarch64.so.1', '', d)}'
+]
+[properties]
+sys_root = @OECORE_NATIVE_SYSROOT
+EOF
+
     cat >${D}${datadir}/meson/meson.cross.template <<EOF
 [binaries]
 c = @CC
-- 
2.17.1



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

* Re: [PATCH 2/2] [WIP]: meson: install native file in sdk
  2021-10-12 10:12 ` [PATCH 2/2] [WIP]: meson: install native file in sdk Hsia-Jun Li
@ 2021-10-12 10:49   ` Alexander Kanavin
  2021-10-12 11:23     ` Hsia-Jun Li
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2021-10-12 10:49 UTC (permalink / raw)
  To: Hsia-Jun Li; +Cc: OE-core

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

Can you add a nativesdk testcase for this please? Into
meta/lib/oeqa/sdk/cases/.

Alex

On Tue, 12 Oct 2021 at 12:13, Hsia-Jun Li <randy.li@synaptics.com> wrote:

> From: "Hsia-Jun(Randy) Li" <randy.li@synaptics.com>
>
> Without a native environment file, find_program() can't
> locate the native program inside SDK.
>
> That stops wayland compositor using wayland scanner.
>
> Signed-off-by: Hsia-Jun(Randy) Li <randy.li@synaptics.com>
> ---
>  meta/classes/meson-routines.bbclass           |  4 ++
>  .../meson/meson/meson-setup.py                |  2 +
>  .../meson/meson/meson-wrapper                 |  1 +
>  .../meson/nativesdk-meson_0.59.1.bb           | 38 +++++++++++++++++++
>  4 files changed, 45 insertions(+)
>
> diff --git a/meta/classes/meson-routines.bbclass
> b/meta/classes/meson-routines.bbclass
> index be3aeedeba..a74a9916d8 100644
> --- a/meta/classes/meson-routines.bbclass
> +++ b/meta/classes/meson-routines.bbclass
> @@ -4,6 +4,10 @@ def meson_array(var, d):
>      items = d.getVar(var).split()
>      return repr(items[0] if len(items) == 1 else items)
>
> +def meson_list_str(var, d):
> +    items = d.getVar(var).split()
> +    return repr(items[0]) if len(items) == 1 else ', '.join(repr(s) for s
> in items)
> +
>  # Map our ARCH values to what Meson expects:
>  # http://mesonbuild.com/Reference-tables.html#cpu-families
>  def meson_cpu_family(var, d):
> diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py
> b/meta/recipes-devtools/meson/meson/meson-setup.py
> index 7ac4e3ad47..4a0a967fef 100755
> --- a/meta/recipes-devtools/meson/meson/meson-setup.py
> +++ b/meta/recipes-devtools/meson/meson/meson-setup.py
> @@ -27,6 +27,8 @@ except KeyError:
>
>  template_file = os.path.join(sysroot,
> 'usr/share/meson/meson.cross.template')
>  cross_file = os.path.join(sysroot, 'usr/share/meson/%smeson.cross' %
> os.environ["TARGET_PREFIX"])
> +native_template_file = os.path.join(sysroot,
> 'usr/share/meson/meson.native.template')
> +native_file = os.path.join(sysroot, 'usr/share/meson/meson.native')
>
>  with open(template_file) as in_file:
>      template = in_file.read()
> diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper
> b/meta/recipes-devtools/meson/meson/meson-wrapper
> index d4ffe60f9a..d4b5187f8d 100755
> --- a/meta/recipes-devtools/meson/meson/meson-wrapper
> +++ b/meta/recipes-devtools/meson/meson/meson-wrapper
> @@ -11,4 +11,5 @@ unset CC CXX CPP LD AR NM STRIP
>
>  exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
>       --cross-file
> "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \
> +     --native-file
> "${OECORE_NATIVE_SYSROOT}/usr/share/meson/meson.native" \
>       "$@"
> diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> index 5657397ddc..f537204a2d 100644
> --- a/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> +++ b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> @@ -15,6 +15,44 @@ SRC_URI += "file://meson-setup.py \
>  #   them.
>  do_install:append() {
>      install -d ${D}${datadir}/meson
> +
> +    cat >${D}${datadir}/meson/meson.native.template <<EOF
> +[binaries]
> +c = ${@meson_array('BUILD_CC', d)}
> +cpp = ${@meson_array('BUILD_CXX', d)}
> +ar = ${@meson_array('BUILD_AR', d)}
> +nm = ${@meson_array('BUILD_NM', d)}
> +strip = ${@meson_array('BUILD_STRIP', d)}
> +readelf = ${@meson_array('BUILD_READELF', d)}
> +pkgconfig = 'pkg-config-native'
> +
> +[built-in options]
> +c_args = ['-isystem' @OECORE_NATIVE_SYSROOT '${includedir_native}' ,
> ${@meson_list_str('BUILD_OPTIMIZATION', d)}]
> +c_link_args = ['-L' @OECORE_NATIVE_SYSROOT '${libdir_native}',
> +               '-L' @@OECORE_NATIVE_SYSROOT '${base_libdir_native}',
> +               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT
> '${libdir_native}',
> +               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT
> '${base_libdir_native}',
> +               '-Wl,--allow-shlib-undefined',
> +               '-Wl,--dynamic-linker=' @OECORE_NATIVE_SYSROOT
> '${base_libdir_native}'
> +               '${@bb.utils.contains('BUILD_ARCH', 'x86_64',
> 'ld-linux-x86-64.so.2', '', d)}
> +                ${@bb.utils.contains('BUILD_ARCH', 'i686',
> 'ld-linux.so.2', '', d)}
> +                ${@bb.utils.contains('BUILD_ARCH', 'aarch64',
> 'ld-linux-aarch64.so.1', '', d)}'
> +]
> +cpp_args = ['-isystem@OECORE_NATIVE_SYSROOT' 'usr/include',
> ${@meson_list_str('BUILD_OPTIMIZATION', d)}]
> +cpp_link_args = ['-L' @OECORE_NATIVE_SYSROOT '${libdir_native}',
> +               '-L' @@OECORE_NATIVE_SYSROOT '${base_libdir_native}',
> +               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT
> '${libdir_native}',
> +               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT
> '${base_libdir_native}',
> +               '-Wl,--allow-shlib-undefined',
> +               '-Wl,--dynamic-linker=' @OECORE_NATIVE_SYSROOT
> '${base_libdir_native}'
> +               '${@bb.utils.contains('BUILD_ARCH', 'x86_64',
> 'ld-linux-x86-64.so.2', '', d)}
> +                ${@bb.utils.contains('BUILD_ARCH', 'i686',
> 'ld-linux.so.2', '', d)}
> +                ${@bb.utils.contains('BUILD_ARCH', 'aarch64',
> 'ld-linux-aarch64.so.1', '', d)}'
> +]
> +[properties]
> +sys_root = @OECORE_NATIVE_SYSROOT
> +EOF
> +
>      cat >${D}${datadir}/meson/meson.cross.template <<EOF
>  [binaries]
>  c = @CC
> --
> 2.17.1
>
>

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

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

* Re: [PATCH 2/2] [WIP]: meson: install native file in sdk
  2021-10-12 10:49   ` Alexander Kanavin
@ 2021-10-12 11:23     ` Hsia-Jun Li
  0 siblings, 0 replies; 5+ messages in thread
From: Hsia-Jun Li @ 2021-10-12 11:23 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core



On 10/12/21 18:49, Alexander Kanavin wrote:
> CAUTION: Email originated externally, do not click links or open 
> attachments unless you recognize the sender and know the content is safe.
> 
> Can you add a nativesdk testcase for this please? Into 
> meta/lib/oeqa/sdk/cases/.
I see

Meanwhile, this patch is buggy, I just tested it.
I just wonder whether there is a better way to compose those properties 
and I want to show how ugly it would be if there would not be a better 
method.

> 
> Alex
> 
> On Tue, 12 Oct 2021 at 12:13, Hsia-Jun Li <randy.li@synaptics.com 
> <mailto:randy.li@synaptics.com>> wrote:
> 
>     From: "Hsia-Jun(Randy) Li" <randy.li@synaptics.com
>     <mailto:randy.li@synaptics.com>>
> 
>     Without a native environment file, find_program() can't
>     locate the native program inside SDK.
> 
>     That stops wayland compositor using wayland scanner.
> 
>     Signed-off-by: Hsia-Jun(Randy) Li <randy.li@synaptics.com
>     <mailto:randy.li@synaptics.com>>
>     ---
>       meta/classes/meson-routines.bbclass           |  4 ++
>       .../meson/meson/meson-setup.py                |  2 +
>       .../meson/meson/meson-wrapper                 |  1 +
>       .../meson/nativesdk-meson_0.59.1.bb
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__nativesdk-2Dmeson-5F0.59.1.bb&d=DwMFaQ&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=rZRVMF0TdY-eN9YYy3VmV26Iu6PaWjRmF1zrbh4B24A&s=-45qJZTfmnPboJWsspT4Jt9sjXV0_M8sBu84n8NK7zc&e=>
>               | 38 +++++++++++++++++++
>       4 files changed, 45 insertions(+)
> 
>     diff --git a/meta/classes/meson-routines.bbclass
>     b/meta/classes/meson-routines.bbclass
>     index be3aeedeba..a74a9916d8 100644
>     --- a/meta/classes/meson-routines.bbclass
>     +++ b/meta/classes/meson-routines.bbclass
>     @@ -4,6 +4,10 @@ def meson_array(var, d):
>           items = d.getVar(var).split()
>           return repr(items[0] if len(items) == 1 else items)
> 
>     +def meson_list_str(var, d):
>     +    items = d.getVar(var).split()
>     +    return repr(items[0]) if len(items) == 1 else ', '.join(repr(s)
>     for s in items)
>     +
>       # Map our ARCH values to what Meson expects:
>       # http://mesonbuild.com/Reference-tables.html#cpu-families
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__mesonbuild.com_Reference-2Dtables.html-23cpu-2Dfamilies&d=DwMFaQ&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=rZRVMF0TdY-eN9YYy3VmV26Iu6PaWjRmF1zrbh4B24A&s=EapMOkBLWInOH2bqaFYDqP016Yvq4DLaXltKV6Nnmw4&e=>
>       def meson_cpu_family(var, d):
>     diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py
>     b/meta/recipes-devtools/meson/meson/meson-setup.py
>     index 7ac4e3ad47..4a0a967fef 100755
>     --- a/meta/recipes-devtools/meson/meson/meson-setup.py
>     +++ b/meta/recipes-devtools/meson/meson/meson-setup.py
>     @@ -27,6 +27,8 @@ except KeyError:
> 
>       template_file = os.path.join(sysroot,
>     'usr/share/meson/meson.cross.template')
>       cross_file = os.path.join(sysroot, 'usr/share/meson/%smeson.cross'
>     % os.environ["TARGET_PREFIX"])
>     +native_template_file = os.path.join(sysroot,
>     'usr/share/meson/meson.native.template')
>     +native_file = os.path.join(sysroot, 'usr/share/meson/meson.native')
> 
>       with open(template_file) as in_file:
>           template = in_file.read()
>     diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper
>     b/meta/recipes-devtools/meson/meson/meson-wrapper
>     index d4ffe60f9a..d4b5187f8d 100755
>     --- a/meta/recipes-devtools/meson/meson/meson-wrapper
>     +++ b/meta/recipes-devtools/meson/meson/meson-wrapper
>     @@ -11,4 +11,5 @@ unset CC CXX CPP LD AR NM STRIP
> 
>       exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
>            --cross-file
>     "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \
>     +     --native-file
>     "${OECORE_NATIVE_SYSROOT}/usr/share/meson/meson.native" \
>            "$@"
>     diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__nativesdk-2Dmeson-5F0.59.1.bb&d=DwMFaQ&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=rZRVMF0TdY-eN9YYy3VmV26Iu6PaWjRmF1zrbh4B24A&s=-45qJZTfmnPboJWsspT4Jt9sjXV0_M8sBu84n8NK7zc&e=>
>     b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__nativesdk-2Dmeson-5F0.59.1.bb&d=DwMFaQ&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=rZRVMF0TdY-eN9YYy3VmV26Iu6PaWjRmF1zrbh4B24A&s=-45qJZTfmnPboJWsspT4Jt9sjXV0_M8sBu84n8NK7zc&e=>
>     index 5657397ddc..f537204a2d 100644
>     --- a/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__nativesdk-2Dmeson-5F0.59.1.bb&d=DwMFaQ&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=rZRVMF0TdY-eN9YYy3VmV26Iu6PaWjRmF1zrbh4B24A&s=-45qJZTfmnPboJWsspT4Jt9sjXV0_M8sBu84n8NK7zc&e=>
>     +++ b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__nativesdk-2Dmeson-5F0.59.1.bb&d=DwMFaQ&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=rZRVMF0TdY-eN9YYy3VmV26Iu6PaWjRmF1zrbh4B24A&s=-45qJZTfmnPboJWsspT4Jt9sjXV0_M8sBu84n8NK7zc&e=>
>     @@ -15,6 +15,44 @@ SRC_URI += "file://meson-setup.py \
>       #   them.
>       do_install:append() {
>           install -d ${D}${datadir}/meson
>     +
>     +    cat >${D}${datadir}/meson/meson.native.template <<EOF
>     +[binaries]
>     +c = ${@meson_array('BUILD_CC', d)}
>     +cpp = ${@meson_array('BUILD_CXX', d)}
>     +ar = ${@meson_array('BUILD_AR', d)}
>     +nm = ${@meson_array('BUILD_NM', d)}
>     +strip = ${@meson_array('BUILD_STRIP', d)}
>     +readelf = ${@meson_array('BUILD_READELF', d)}
>     +pkgconfig = 'pkg-config-native'
>     +
>     +[built-in options]
>     +c_args = ['-isystem' @OECORE_NATIVE_SYSROOT '${includedir_native}'
>     , ${@meson_list_str('BUILD_OPTIMIZATION', d)}]
>     +c_link_args = ['-L' @OECORE_NATIVE_SYSROOT '${libdir_native}',
>     +               '-L' @@OECORE_NATIVE_SYSROOT '${base_libdir_native}',
>     +               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT
>     '${libdir_native}',
>     +               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT
>     '${base_libdir_native}',
>     +               '-Wl,--allow-shlib-undefined',
>     +               '-Wl,--dynamic-linker=' @OECORE_NATIVE_SYSROOT
>     '${base_libdir_native}'
>     +               '${@bb.utils.contains('BUILD_ARCH', 'x86_64',
>     'ld-linux-x86-64.so.2', '', d)}
>     +                ${@bb.utils.contains('BUILD_ARCH', 'i686',
>     'ld-linux.so.2', '', d)}
>     +                ${@bb.utils.contains('BUILD_ARCH', 'aarch64',
>     'ld-linux-aarch64.so.1', '', d)}'
>     +]
>     +cpp_args = ['-isystem@OECORE_NATIVE_SYSROOT' 'usr/include',
>     ${@meson_list_str('BUILD_OPTIMIZATION', d)}]
>     +cpp_link_args = ['-L' @OECORE_NATIVE_SYSROOT '${libdir_native}',
>     +               '-L' @@OECORE_NATIVE_SYSROOT '${base_libdir_native}',
>     +               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT
>     '${libdir_native}',
>     +               '-Wl,-rpath-link,' @OECORE_NATIVE_SYSROOT
>     '${base_libdir_native}',
>     +               '-Wl,--allow-shlib-undefined',
>     +               '-Wl,--dynamic-linker=' @OECORE_NATIVE_SYSROOT
>     '${base_libdir_native}'
>     +               '${@bb.utils.contains('BUILD_ARCH', 'x86_64',
>     'ld-linux-x86-64.so.2', '', d)}
>     +                ${@bb.utils.contains('BUILD_ARCH', 'i686',
>     'ld-linux.so.2', '', d)}
>     +                ${@bb.utils.contains('BUILD_ARCH', 'aarch64',
>     'ld-linux-aarch64.so.1', '', d)}'
>     +]
>     +[properties]
>     +sys_root = @OECORE_NATIVE_SYSROOT
>     +EOF
>     +
>           cat >${D}${datadir}/meson/meson.cross.template <<EOF
>       [binaries]
>       c = @CC
>     -- 
>     2.17.1
> 

-- 
Hsia-Jun(Randy) Li

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

end of thread, other threads:[~2021-10-12 11:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 10:12 [PATCH 0/2] meson: fix environmemt files in SDK Hsia-Jun Li
2021-10-12 10:12 ` [PATCH 1/2] meson: move lang args to the right section Hsia-Jun Li
2021-10-12 10:12 ` [PATCH 2/2] [WIP]: meson: install native file in sdk Hsia-Jun Li
2021-10-12 10:49   ` Alexander Kanavin
2021-10-12 11:23     ` Hsia-Jun Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).