summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-03 17:34:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-04 23:14:05 +0000
commit9b5c9dea64f85ef74a039b916dd950ca693ffa2b (patch)
treeff7e17cf3dc977888f00d6e3c14ab494015266c9 /meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
parentf22e1fbdf7bed111e080d176fe5a39c5139308ed (diff)
downloadpoky-9b5c9dea64f85ef74a039b916dd950ca693ffa2b.tar.gz
meson: Handle qemu riscv issues
In qemu, they merged the 32 and 64 bit riscv variants into one target for meson purposes but this isn't officially supported by upstream meson. In normal builds this would just be a warning but in OE, this is fatal. Avoid the fatal errors for now and build as qemu intended whilst this is resolved by the upstreams. (From OE-Core rev: 7c1356e762d357dad95decf7b1d6147a2efae174) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch')
-rw-r--r--meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch28
1 files changed, 16 insertions, 12 deletions
diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
index c5be526b10..848dccfbe7 100644
--- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
+++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
@@ -11,30 +11,34 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
11 mesonbuild/environment.py | 4 +--- 11 mesonbuild/environment.py | 4 +---
12 2 files changed, 2 insertions(+), 4 deletions(-) 12 2 files changed, 2 insertions(+), 4 deletions(-)
13 13
14diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py 14Index: meson-0.60.2/mesonbuild/envconfig.py
15index 307aac3..66fb7ec 100644 15===================================================================
16--- a/mesonbuild/envconfig.py 16--- meson-0.60.2.orig/mesonbuild/envconfig.py
17+++ b/mesonbuild/envconfig.py 17+++ meson-0.60.2/mesonbuild/envconfig.py
18@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject): 18@@ -266,8 +266,8 @@ class MachineInfo(HoldableObject):
19 'but is missing {}.'.format(minimum_literal - set(literal)))
19 20
20 cpu_family = literal['cpu_family'] 21 cpu_family = literal['cpu_family']
21 if cpu_family not in known_cpu_families: 22- if cpu_family not in known_cpu_families:
22- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new') 23- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
24+ if cpu_family not in known_cpu_families and cpu_family != "riscv":
23+ raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family)) 25+ raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
24 26
25 endian = literal['endian'] 27 endian = literal['endian']
26 if endian not in ('little', 'big'): 28 if endian not in ('little', 'big'):
27diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py 29Index: meson-0.60.2/mesonbuild/environment.py
28index 71286a5..179917e 100644 30===================================================================
29--- a/mesonbuild/environment.py 31--- meson-0.60.2.orig/mesonbuild/environment.py
30+++ b/mesonbuild/environment.py 32+++ meson-0.60.2/mesonbuild/environment.py
31@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: 33@@ -354,10 +354,8 @@ def detect_cpu_family(compilers: Compile
34 if any_compiler_has_define(compilers, '__64BIT__'):
32 trial = 'ppc64' 35 trial = 'ppc64'
33 36
34 if trial not in known_cpu_families: 37- if trial not in known_cpu_families:
35- mlog.warning(f'Unknown CPU family {trial!r}, please report this at ' 38- mlog.warning(f'Unknown CPU family {trial!r}, please report this at '
36- 'https://github.com/mesonbuild/meson/issues/new with the ' 39- 'https://github.com/mesonbuild/meson/issues/new with the '
37- 'output of `uname -a` and `cat /proc/cpuinfo`') 40- 'output of `uname -a` and `cat /proc/cpuinfo`')
41+ if trial not in known_cpu_families and trail != "riscv":
38+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial) 42+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
39 43
40 return trial 44 return trial