From 89e0414efd9ccad54c74c04d425c3974e6f64196 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 24 Sep 2018 16:47:17 +0100 Subject: environment: validate endian value from cross file When reading the endian from a cross file, validate that the value is either 'big' or 'little'. --- mesonbuild/environment.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mesonbuild/environment.py') diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 3ca8692..7a44f2f 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -1040,6 +1040,9 @@ class CrossBuildInfo: if entry == 'cpu_family' and res not in known_cpu_families: mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % value) + if entry == 'endian' and res not in ('little', 'big'): + mlog.warning('Unknown endian %s in cross file' % res) + if self.ok_type(res): self.config[s][entry] = res elif isinstance(res, list): -- cgit v1.1