Skip to contentSkip to conversation

meson: Split validate-cpu.patch in three

PATCH New Peter Kjellerstedt 1 participant 2 messages Aug 14, 2018 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 meson: Split validate-cpu.patch in three

This makes it more suitable to work with, e.g., devtool. It also prepares for the update to 0.47.0 when the first patch will no longer be needed (as it is a backport).

---
Patch v2: Rebased on current master due to conflicts.

 meta/recipes-devtools/meson/meson.inc              |  4 +-
 ...u.patch => 0001-Validate-cpu_family-3753.patch} | 80 ++++++++++------------
 .../0002-Make-CPU-family-warnings-fatal.patch      | 36 ++++++++++
 ...r-to-our-wiki-instead-of-Meson-bug-system.patch | 40 +++++++++++
 4 files changed, 115 insertions(+), 45 deletions(-)
 rename meta/recipes-devtools/meson/meson/{validate-cpu.patch => 0001-Validate-cpu_family-3753.patch} (55%)
 create mode 100644 meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch
 create mode 100644 meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch
meta/recipes-devtools/meson/meson.inc +3 -1
index a650469e93..c9e1e051c6 100644
@@ -11,7 +11,9 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
            file://0003-native_bindir.patch \
            file://0004-Prettifying-some-output-with-pathlib.patch \
            file://0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch \
-           file://validate-cpu.patch \
+           file://0001-Validate-cpu_family-3753.patch \
+           file://0002-Make-CPU-family-warnings-fatal.patch \
+           file://0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch \
            file://0001-mesonbuild-Recognise-risc-v-architecture.patch \
            "
 
meta/recipes-devtools/meson/meson/0001-Validate-cpu_family-3753.patch renamed from meta/recipes-devtools/meson/meson/validate-cpu.patch +36 -44

102 lines not on this page · raw message

meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch new file +36 -0
new file mode 100644
index 0000000000..3b377351a2
@@ -0,0 +1,36 @@
+From 9681c5bdea6a67abf014d94a392ef42eea7df0cd Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Tue, 3 Jul 2018 13:59:09 +0100
+Subject: [PATCH 2/3] Make CPU family warnings fatal
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Ross Burton <[email protected]>
+---
+ mesonbuild/environment.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index 678d009..8b32892 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -228,7 +228,7 @@ def detect_cpu_family(compilers):
+     # Add fixes here as bugs are reported.
+ 
+     if trial not in known_cpu_families:
+-        mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
++        raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
+ 
+     return trial
+ 
+@@ -1043,7 +1043,7 @@ class CrossBuildInfo:
+                     raise EnvironmentException('Malformed value in cross file variable %s.' % entry)
+ 
+                 if entry == 'cpu_family' and res not in known_cpu_families:
+-                    mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % value)
++                    raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
+ 
+                 if self.ok_type(res):
+                     self.config[s][entry] = res
+-- 
+2.12.0
+
meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch new file +40 -0
new file mode 100644
index 0000000000..8f4603e767
@@ -0,0 +1,40 @@
+From 62f4702a1d5076d0c225f899fe65cd3badfdd022 Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Fri, 6 Jul 2018 15:51:15 +0100
+Subject: [PATCH 3/3] Send user to our wiki instead of Meson bug system
+
+If a CPU family isn't recognised the first step should be to verify the
+mapping. Send the user to a wiki page explaining what to do, instead of
+directly to the Meson bug tracker.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Ross Burton <[email protected]>
+---
+ mesonbuild/environment.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index 8b32892..a0580a2 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -228,7 +228,7 @@ def detect_cpu_family(compilers):
+     # Add fixes here as bugs are reported.
+ 
+     if trial not in known_cpu_families:
+-        raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
++        raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
+ 
+     return trial
+ 
+@@ -1043,7 +1043,7 @@ class CrossBuildInfo:
+                     raise EnvironmentException('Malformed value in cross file variable %s.' % entry)
+ 
+                 if entry == 'cpu_family' and res not in known_cpu_families:
+-                    raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
++                    raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % value)
+ 
+                 if self.ok_type(res):
+                     self.config[s][entry] = res
+-- 
+2.12.0
+
Signature · 1 line
2.12.0
#1 lore raw

PATCH v2 2/2 meson: Support building allarch recipes again

This registers "allarch" as a known CPU family.

---
Patch v2: Rebased on current master due to conflicts.

 meta/recipes-devtools/meson/meson.inc              |  1 +
 ...01-Support-building-allarch-recipes-again.patch | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-devtools/meson/meson/0001-Support-building-allarch-recipes-again.patch
meta/recipes-devtools/meson/meson.inc +1 -0
index c9e1e051c6..b5dfa2c2a2 100644
@@ -15,6 +15,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
            file://0002-Make-CPU-family-warnings-fatal.patch \
            file://0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch \
            file://0001-mesonbuild-Recognise-risc-v-architecture.patch \
+           file://0001-Support-building-allarch-recipes-again.patch \
            "
 
 SRC_URI[md5sum] = "1698f6526574839de5dcdc45e3f7d582"
meta/recipes-devtools/meson/meson/0001-Support-building-allarch-recipes-again.patch new file +28 -0
new file mode 100644
index 0000000000..f6dd230916
@@ -0,0 +1,28 @@
+From d80d02a3ca6e21fa3d055c88c05234c2eb4db128 Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <[email protected]>
+Date: Thu, 26 Jul 2018 16:32:49 +0200
+Subject: [PATCH] Support building allarch recipes again
+
+This registers "allarch" as a known CPU family.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Peter Kjellerstedt <[email protected]>
+---
+ mesonbuild/environment.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index a0580a2..712b1e8 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -73,6 +73,7 @@ from .compilers import (
+ build_filename = 'meson.build'
+ 
+ known_cpu_families = (
++    'allarch',
+     'aarch64',
+     'arm',
+     'e2k',
+-- 
+2.12.0
+
Signature · 1 line
2.12.0