blob: 39b1af52e7dc3b89760a911f04103dc5e72a97c4 [file] [log] [blame]
Andrew Geissler475cb722020-07-10 16:00:51 -05001From 62c415eedb62905de76e2e0bbd156a947705cab2 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
4Subject: [PATCH] Make CPU family warnings fatal
5
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 Geissler4ed12e12020-06-05 18:00:41 -050015index 17058df..18bbf86 100644
Brad Bishopc342db32019-05-15 21:57:59 -040016--- a/mesonbuild/envconfig.py
17+++ b/mesonbuild/envconfig.py
Andrew Geissler4ed12e12020-06-05 18:00:41 -050018@@ -225,7 +225,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:
22- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % cpu_family)
23+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % 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 Geissler4ed12e12020-06-05 18:00:41 -050028index a2f78a4..59fcb07 100644
Brad Bishop19323692019-04-05 15:28:33 -040029--- a/mesonbuild/environment.py
30+++ b/mesonbuild/environment.py
Andrew Geissler4ed12e12020-06-05 18:00:41 -050031@@ -364,9 +364,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