Skip to contentSkip to conversation

fix environmemt files in SDK

PATCH New Hsia-Jun Li 1 participant 3 messages Oct 25, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

v2 cover fix environmemt files in SDK

From: "Hsia-Jun(Randy) Li" <[email protected]>

I am sorry I am very busy recently, so I don't have time to add an QA test class this time. Thoses patches were verified two days from mail last time, I just don't have time to send them.

Changelog:
v2
The script generates native file in nativesdk should work now.

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

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

 meta/recipes-devtools/meson/meson/meson-setup.py   |  8 ++++
 meta/recipes-devtools/meson/meson/meson-wrapper    |  1 +
 .../meson/nativesdk-meson_0.59.2.bb                | 52 +++++++++++++++++++++-
 3 files changed, 59 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/2 meson: move lang args to the right section

From: Randy Li <[email protected]>

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

---
 meta/recipes-devtools/meson/nativesdk-meson_0.59.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/meson/nativesdk-meson_0.59.2.bb +4 -2
index 0e76cc7..5657397 100644
@@ -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]
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 2/2 meson: install native file in sdk

In reply to Hsia-Jun Li

From: "Hsia-Jun(Randy) Li" <[email protected]>

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

That stops wayland compositor using wayland scanner.

---
 meta/recipes-devtools/meson/meson/meson-setup.py   |  8 ++++
 meta/recipes-devtools/meson/meson/meson-wrapper    |  1 +
 .../meson/nativesdk-meson_0.59.2.bb                | 46 ++++++++++++++++++++++
 3 files changed, 55 insertions(+)
meta/recipes-devtools/meson/meson/meson-setup.py +8 -0
index 7ac4e3a..daaa551 100755
@@ -27,9 +27,17 @@ 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()
     output = Template(template).substitute(Environ())
     with open(cross_file, "w") as out_file:
         out_file.write(output)
+
+with open(native_template_file) as in_file:
+    template = in_file.read()
+    output = Template(template).substitute({'OECORE_NATIVE_SYSROOT': os.environ['OECORE_NATIVE_SYSROOT']})
+    with open(native_file, "w") as out_file:
+        out_file.write(output)
meta/recipes-devtools/meson/meson/meson-wrapper +1 -0
index d4ffe60..d4b5187 100755
@@ -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" \
      "$@"
meta/recipes-devtools/meson/nativesdk-meson_0.59.2.bb +46 -0

54 lines not on this page · raw message

Signature · 1 line
2.7.4