diff options
-rw-r--r-- | meta/recipes-devtools/meson/meson.inc | 4 | ||||
-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.patch | 36 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch | 40 |
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 @@ | |||
1 | Validate the passed CPU family (US: backport) and turn the upstream warning to | 1 | From 12fe95b1943eb832a54ba09274fa02c60d04f6b0 Mon Sep 17 00:00:00 2001 |
2 | an error (US: inappropriate). | ||
3 | |||
4 | Upstream-Status: Backport | ||
5 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
6 | |||
7 | From 456f7ea48503731d50a2b7287a0f198b73b4fe61 Mon Sep 17 00:00:00 2001 | ||
8 | From: Ross Burton <ross@burtonini.com> | 2 | From: Ross Burton <ross@burtonini.com> |
9 | Date: Wed, 20 Jun 2018 13:45:44 +0100 | 3 | Date: Wed, 20 Jun 2018 13:45:44 +0100 |
10 | Subject: [PATCH 1/2] Validate cpu_family (#3753) | 4 | Subject: [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 | |||
25 | import platform; platform.machine() | 19 | import platform; platform.machine() |
26 | 20 | ||
27 | Partial fix for #3751 | 21 | Partial fix for #3751 |
22 | |||
23 | Upstream-Status: Backport | ||
24 | Signed-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 | ||
32 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | 30 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py |
33 | index 6920b8d6..091d92dc 100644 | 31 | index 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 | -- | 79 | diff --git a/run_unittests.py b/run_unittests.py |
82 | 2.11.0 | 80 | index 3c215db..7185008 100755 |
83 | 81 | --- a/run_unittests.py | |
84 | 82 | +++ b/run_unittests.py | |
85 | From 202e0199d3ffd2637f4dbee08f8351520f7dde3b Mon Sep 17 00:00:00 2001 | 83 | @@ -2065,6 +2065,24 @@ recommended as it can lead to undefined behaviour on some platforms''') |
86 | From: Ross Burton <ross.burton@intel.com> | 84 | self.wipe() |
87 | Date: Tue, 3 Jul 2018 13:59:09 +0100 | ||
88 | Subject: [PATCH 2/2] Make CPU family warnings fatal | ||
89 | |||
90 | --- | ||
91 | mesonbuild/environment.py | 4 ++-- | ||
92 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
93 | |||
94 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | ||
95 | index 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 | -- |
117 | 2.11.0 | 109 | 2.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 @@ | |||
1 | From 9681c5bdea6a67abf014d94a392ef42eea7df0cd Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@intel.com> | ||
3 | Date: Tue, 3 Jul 2018 13:59:09 +0100 | ||
4 | Subject: [PATCH 2/3] Make CPU family warnings fatal | ||
5 | |||
6 | Upstream-Status: Inappropriate [OE specific] | ||
7 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
8 | --- | ||
9 | mesonbuild/environment.py | 4 ++-- | ||
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | ||
13 | index 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 | -- | ||
35 | 2.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 @@ | |||
1 | From 62f4702a1d5076d0c225f899fe65cd3badfdd022 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@intel.com> | ||
3 | Date: Fri, 6 Jul 2018 15:51:15 +0100 | ||
4 | Subject: [PATCH 3/3] Send user to our wiki instead of Meson bug system | ||
5 | |||
6 | If a CPU family isn't recognised the first step should be to verify the | ||
7 | mapping. Send the user to a wiki page explaining what to do, instead of | ||
8 | directly to the Meson bug tracker. | ||
9 | |||
10 | Upstream-Status: Inappropriate [OE specific] | ||
11 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
12 | --- | ||
13 | mesonbuild/environment.py | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | ||
17 | index 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 | -- | ||
39 | 2.12.0 | ||
40 | |||