summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/meson/meson.inc4
-rw-r--r--meta/recipes-devtools/meson/meson/0001-Validate-cpu_family-3753.patch (renamed from meta/recipes-devtools/meson/meson/validate-cpu.patch)80
-rw-r--r--meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch36
-rw-r--r--meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch40
4 files changed, 115 insertions, 45 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index a650469e93..c9e1e051c6 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -11,7 +11,9 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
11 file://0003-native_bindir.patch \ 11 file://0003-native_bindir.patch \
12 file://0004-Prettifying-some-output-with-pathlib.patch \ 12 file://0004-Prettifying-some-output-with-pathlib.patch \
13 file://0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch \ 13 file://0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch \
14 file://validate-cpu.patch \ 14 file://0001-Validate-cpu_family-3753.patch \
15 file://0002-Make-CPU-family-warnings-fatal.patch \
16 file://0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch \
15 file://0001-mesonbuild-Recognise-risc-v-architecture.patch \ 17 file://0001-mesonbuild-Recognise-risc-v-architecture.patch \
16 " 18 "
17 19
diff --git a/meta/recipes-devtools/meson/meson/validate-cpu.patch b/meta/recipes-devtools/meson/meson/0001-Validate-cpu_family-3753.patch
index e7dad00d47..6b0d0ca588 100644
--- a/meta/recipes-devtools/meson/meson/validate-cpu.patch
+++ b/meta/recipes-devtools/meson/meson/0001-Validate-cpu_family-3753.patch
@@ -1,13 +1,7 @@
1Validate the passed CPU family (US: backport) and turn the upstream warning to 1From 12fe95b1943eb832a54ba09274fa02c60d04f6b0 Mon Sep 17 00:00:00 2001
2an error (US: inappropriate).
3
4Upstream-Status: Backport
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7From 456f7ea48503731d50a2b7287a0f198b73b4fe61 Mon Sep 17 00:00:00 2001
8From: Ross Burton <ross@burtonini.com> 2From: Ross Burton <ross@burtonini.com>
9Date: Wed, 20 Jun 2018 13:45:44 +0100 3Date: Wed, 20 Jun 2018 13:45:44 +0100
10Subject: [PATCH 1/2] Validate cpu_family (#3753) 4Subject: [PATCH 1/3] Validate cpu_family (#3753)
11 5
12* environment: validate cpu_family in cross file 6* environment: validate cpu_family in cross file
13 7
@@ -25,12 +19,16 @@ $ python3
25import platform; platform.machine() 19import platform; platform.machine()
26 20
27Partial fix for #3751 21Partial fix for #3751
22
23Upstream-Status: Backport
24Signed-off-by: Ross Burton <ross.burton@intel.com>
28--- 25---
29 mesonbuild/environment.py | 24 ++++++++++++++++++++++++ 26 mesonbuild/environment.py | 24 ++++++++++++++++++++++++
30 1 file changed, 24 insertions(+) 27 run_unittests.py | 18 ++++++++++++++++++
28 2 files changed, 42 insertions(+)
31 29
32diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py 30diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
33index 6920b8d6..091d92dc 100644 31index d02a837..678d009 100644
34--- a/mesonbuild/environment.py 32--- a/mesonbuild/environment.py
35+++ b/mesonbuild/environment.py 33+++ b/mesonbuild/environment.py
36@@ -72,6 +72,22 @@ from .compilers import ( 34@@ -72,6 +72,22 @@ from .compilers import (
@@ -78,41 +76,35 @@ index 6920b8d6..091d92dc 100644
78 if self.ok_type(res): 76 if self.ok_type(res):
79 self.config[s][entry] = res 77 self.config[s][entry] = res
80 elif isinstance(res, list): 78 elif isinstance(res, list):
81-- 79diff --git a/run_unittests.py b/run_unittests.py
822.11.0 80index 3c215db..7185008 100755
83 81--- a/run_unittests.py
84 82+++ b/run_unittests.py
85From 202e0199d3ffd2637f4dbee08f8351520f7dde3b Mon Sep 17 00:00:00 2001 83@@ -2065,6 +2065,24 @@ recommended as it can lead to undefined behaviour on some platforms''')
86From: Ross Burton <ross.burton@intel.com> 84 self.wipe()
87Date: Tue, 3 Jul 2018 13:59:09 +0100
88Subject: [PATCH 2/2] Make CPU family warnings fatal
89
90---
91 mesonbuild/environment.py | 4 ++--
92 1 file changed, 2 insertions(+), 2 deletions(-)
93
94diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
95index 091d92dc..67177c1f 100644
96--- a/mesonbuild/environment.py
97+++ b/mesonbuild/environment.py
98@@ -228,7 +228,7 @@ def detect_cpu_family(compilers):
99 # Add fixes here as bugs are reported.
100
101 if trial not in known_cpu_families:
102- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
103+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
104 85
105 return trial
106
107@@ -1043,7 +1043,7 @@ class CrossBuildInfo:
108 raise EnvironmentException('Malformed value in cross file variable %s.' % entry)
109 86
110 if entry == 'cpu_family' and res not in known_cpu_families: 87+ @unittest.skipIf(not os.path.isdir('docs'), 'Doc dir not found, presumably because this is a tarball release.')
111- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % value) 88+ def test_cpu_families_documented(self):
112+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % value) 89+ with open("docs/markdown/Reference-tables.md") as f:
113 90+ md = f.read()
114 if self.ok_type(res): 91+ self.assertIsNotNone(md)
115 self.config[s][entry] = res 92+
93+ sections = list(re.finditer(r"^## (.+)$", md, re.MULTILINE))
94+ for s1, s2 in zip(sections[::2], sections[1::2]):
95+ if s1.group(1) == "CPU families":
96+ # Extract the content for this section
97+ content = md[s1.end():s2.start()]
98+ # Find the list entries
99+ arches = [m.group(1) for m in re.finditer(r"^\| (\w+) +\|", content, re.MULTILINE)]
100+ # Drop the header
101+ arches = set(arches[1:])
102+ self.assertEqual(arches, set(mesonbuild.environment.known_cpu_families))
103+
104+
105 class FailureTests(BasePlatformTests):
106 '''
107 Tests that test failure conditions. Build files here should be dynamically
116-- 108--
1172.11.0 1092.12.0
118 110
diff --git a/meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch
new file mode 100644
index 0000000000..3b377351a2
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch
@@ -0,0 +1,36 @@
1From 9681c5bdea6a67abf014d94a392ef42eea7df0cd Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com>
3Date: Tue, 3 Jul 2018 13:59:09 +0100
4Subject: [PATCH 2/3] Make CPU family warnings fatal
5
6Upstream-Status: Inappropriate [OE specific]
7Signed-off-by: Ross Burton <ross.burton@intel.com>
8---
9 mesonbuild/environment.py | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
11
12diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
13index 678d009..8b32892 100644
14--- a/mesonbuild/environment.py
15+++ b/mesonbuild/environment.py
16@@ -228,7 +228,7 @@ def detect_cpu_family(compilers):
17 # Add fixes here as bugs are reported.
18
19 if trial not in known_cpu_families:
20- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
21+ raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
22
23 return trial
24
25@@ -1043,7 +1043,7 @@ class CrossBuildInfo:
26 raise EnvironmentException('Malformed value in cross file variable %s.' % entry)
27
28 if entry == 'cpu_family' and res not in known_cpu_families:
29- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % value)
30+ raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
31
32 if self.ok_type(res):
33 self.config[s][entry] = res
34--
352.12.0
36
diff --git a/meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch b/meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch
new file mode 100644
index 0000000000..8f4603e767
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch
@@ -0,0 +1,40 @@
1From 62f4702a1d5076d0c225f899fe65cd3badfdd022 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com>
3Date: Fri, 6 Jul 2018 15:51:15 +0100
4Subject: [PATCH 3/3] Send user to our wiki instead of Meson bug system
5
6If a CPU family isn't recognised the first step should be to verify the
7mapping. Send the user to a wiki page explaining what to do, instead of
8directly to the Meson bug tracker.
9
10Upstream-Status: Inappropriate [OE specific]
11Signed-off-by: Ross Burton <ross.burton@intel.com>
12---
13 mesonbuild/environment.py | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
17index 8b32892..a0580a2 100644
18--- a/mesonbuild/environment.py
19+++ b/mesonbuild/environment.py
20@@ -228,7 +228,7 @@ def detect_cpu_family(compilers):
21 # Add fixes here as bugs are reported.
22
23 if trial not in known_cpu_families:
24- raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
25+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
26
27 return trial
28
29@@ -1043,7 +1043,7 @@ class CrossBuildInfo:
30 raise EnvironmentException('Malformed value in cross file variable %s.' % entry)
31
32 if entry == 'cpu_family' and res not in known_cpu_families:
33- raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
34+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % value)
35
36 if self.ok_type(res):
37 self.config[s][entry] = res
38--
392.12.0
40