blob: 48941c97f3cdc4c17408efbaf6a42b7756ceef9c [file] [log] [blame]
Andrew Geissler90fd73c2021-03-05 15:25:55 -06001From 76934bcbf2cfa7304e8864e28c51f58adda0392f Mon Sep 17 00:00:00 2001
Brad Bishop19323692019-04-05 15:28:33 -04002From: Ross Burton <ross.burton@intel.com>
3Date: Tue, 3 Jul 2018 13:59:09 +0100
Andrew Geisslerc9f78652020-09-18 14:11:35 -05004Subject: [PATCH] Make CPU family warnings fatal
Brad Bishop19323692019-04-05 15:28:33 -04005
6Upstream-Status: Inappropriate [OE specific]
7Signed-off-by: Ross Burton <ross.burton@intel.com>
8
9---
Brad Bishopc342db32019-05-15 21:57:59 -040010 mesonbuild/envconfig.py | 2 +-
11 mesonbuild/environment.py | 4 +---
12 2 files changed, 2 insertions(+), 4 deletions(-)
Brad Bishop19323692019-04-05 15:28:33 -040013
Brad Bishopc342db32019-05-15 21:57:59 -040014diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
Andrew Geissler90fd73c2021-03-05 15:25:55 -060015index ba35d16..2d3c34c 100644
Brad Bishopc342db32019-05-15 21:57:59 -040016--- a/mesonbuild/envconfig.py
17+++ b/mesonbuild/envconfig.py
Andrew Geissler09209ee2020-12-13 08:44:15 -060018@@ -254,7 +254,7 @@ class MachineInfo:
Andrew Geissler82c905d2020-04-13 13:39:40 -050019
Brad Bishopc342db32019-05-15 21:57:59 -040020 cpu_family = literal['cpu_family']
21 if cpu_family not in known_cpu_families:
Andrew Geissler635e0e42020-08-21 15:58:33 -050022- mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family))
23+ raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
Andrew Geissler82c905d2020-04-13 13:39:40 -050024
Brad Bishopc342db32019-05-15 21:57:59 -040025 endian = literal['endian']
26 if endian not in ('little', 'big'):
Brad Bishop19323692019-04-05 15:28:33 -040027diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
Andrew Geissler90fd73c2021-03-05 15:25:55 -060028index 756dd81..4d2c2b6 100644
Brad Bishop19323692019-04-05 15:28:33 -040029--- a/mesonbuild/environment.py
30+++ b/mesonbuild/environment.py
Andrew Geissler90fd73c2021-03-05 15:25:55 -060031@@ -434,9 +434,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
Andrew Geissler09209ee2020-12-13 08:44:15 -060032 trial = 'ppc64'
Andrew Geissler82c905d2020-04-13 13:39:40 -050033
Brad Bishop19323692019-04-05 15:28:33 -040034 if trial not in known_cpu_families:
35- mlog.warning('Unknown CPU family {!r}, please report this at '
William A. Kennington IIIc5966302020-03-20 13:04:31 -070036- 'https://github.com/mesonbuild/meson/issues/new with the '
Brad Bishop19323692019-04-05 15:28:33 -040037- 'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial))
38+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
Andrew Geissler82c905d2020-04-13 13:39:40 -050039
Brad Bishop19323692019-04-05 15:28:33 -040040 return trial
Andrew Geissler82c905d2020-04-13 13:39:40 -050041