Skip to contentSkip to conversation

meson.bbclass: avoid unexpected operating-system names

PATCH In review Andreas M?ller 1 participant 2 messages Apr 15, 2020 – Apr 23, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson.bbclass: avoid unexpected operating-system names

For example 'linux-gnueabi' is not what meson consumers expect: See canonical table of OS names for Meson (thanks Ross). Surprisingly this did not pop up earlier but wrong system-name can break building as described in [1]

[1] https://lists.openembedded.org/g/openembedded-core/topic/meson_host_machine_system/73023862

---
 meta/classes/meson.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/meson.bbclass +3 -0
index 06034e8b47..167263f76c 100644
@@ -68,6 +68,9 @@ def meson_operating_system(var, d):
     os = d.getVar(var)
     if "mingw" in os:
         return "windows"
+    # avoid e.g 'linux-gnueabi'
+    elif "linux" in os:
+        return "linux"
     else:
         return os
 
Signature · 1 line
2.21.1
#1 lore raw
Quoted 6 lines · Andreas Müller

For example 'linux-gnueabi' is not what meson consumers expect: See canonical table of OS names for Meson (thanks Ross). Surprisingly this did not pop up earlier but wrong system-name can break building as described in [1]

[1] https://lists.openembedded.org/g/openembedded-core/topic/meson_host_machine_system/73023862

Ping

* at least I consider it important: The issue fixed can cause undetected misconfigurations
* yes meson can do better but this is not in the scope of this patch

Andreas