blob: c5be526b103e4f2590e91583149562f4e13dc77e [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001From 6c4eef1d92e9e42fdbc888365cab3c95fb33c605 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 Geisslereff27472021-10-29 15:35:00 -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>
Andrew Geisslereff27472021-10-29 15:35:00 -05008
Brad Bishop19323692019-04-05 15:28:33 -04009---
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 Geisslereff27472021-10-29 15:35:00 -050015index 307aac3..66fb7ec 100644
Brad Bishopc342db32019-05-15 21:57:59 -040016--- a/mesonbuild/envconfig.py
17+++ b/mesonbuild/envconfig.py
Andrew Geisslereff27472021-10-29 15:35:00 -050018@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject):
William A. Kennington IIIac69b482021-06-02 12:28:27 -070019
Brad Bishopc342db32019-05-15 21:57:59 -040020 cpu_family = literal['cpu_family']
21 if cpu_family not in known_cpu_families:
William A. Kennington IIIac69b482021-06-02 12:28:27 -070022- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
Andrew Geissler635e0e42020-08-21 15:58:33 -050023+ raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))
William A. Kennington IIIac69b482021-06-02 12:28:27 -070024
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 Geisslereff27472021-10-29 15:35:00 -050028index 71286a5..179917e 100644
Brad Bishop19323692019-04-05 15:28:33 -040029--- a/mesonbuild/environment.py
30+++ b/mesonbuild/environment.py
Andrew Geisslereff27472021-10-29 15:35:00 -050031@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
Andrew Geissler09209ee2020-12-13 08:44:15 -060032 trial = 'ppc64'
William A. Kennington IIIac69b482021-06-02 12:28:27 -070033
Brad Bishop19323692019-04-05 15:28:33 -040034 if trial not in known_cpu_families:
Andrew Geisslereff27472021-10-29 15:35:00 -050035- mlog.warning(f'Unknown CPU family {trial!r}, please report this at '
William A. Kennington IIIc5966302020-03-20 13:04:31 -070036- 'https://github.com/mesonbuild/meson/issues/new with the '
Andrew Geisslereff27472021-10-29 15:35:00 -050037- 'output of `uname -a` and `cat /proc/cpuinfo`')
Brad Bishop19323692019-04-05 15:28:33 -040038+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
William A. Kennington IIIac69b482021-06-02 12:28:27 -070039
Brad Bishop19323692019-04-05 15:28:33 -040040 return trial
William A. Kennington IIIac69b482021-06-02 12:28:27 -070041