blob: 623e32957fd5a748c629c89bdd22b1654a4f053b [file] [log] [blame]
Andrew Geissler635e0e42020-08-21 15:58:33 -05001From 5624b5835af747b601780ad14646f9c1fb854931 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 Geissler635e0e42020-08-21 15:58:33 -05004Subject: [PATCH 1/2] 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 Geissler635e0e42020-08-21 15:58:33 -050015index 219b62e..d1be65b 100644
Brad Bishopc342db32019-05-15 21:57:59 -040016--- a/mesonbuild/envconfig.py
17+++ b/mesonbuild/envconfig.py
Andrew Geissler635e0e42020-08-21 15:58:33 -050018@@ -199,7 +199,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 Geissler635e0e42020-08-21 15:58:33 -050028index bf09a88..8eabe78 100644
Brad Bishop19323692019-04-05 15:28:33 -040029--- a/mesonbuild/environment.py
30+++ b/mesonbuild/environment.py
Andrew Geissler635e0e42020-08-21 15:58:33 -050031@@ -375,9 +375,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
Brad Bishopc342db32019-05-15 21:57:59 -040032 trial = 'parisc'
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
Andrew Geissler635e0e42020-08-21 15:58:33 -050042--
432.24.0
44