aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorPersian Prince <persianpros@yahoo.com>2020-12-17 22:07:39 +0330
committerGitHub <noreply@github.com>2020-12-17 10:37:39 -0800
commitf5871f434a5b768ad9fcafa797a6db0286421842 (patch)
treecd6ae8667291fa62f322ec6e68d3a4fcaf7f3fc2 /mesonbuild/environment.py
parent5c821edf26babbb412a59024dd881f75e9cfe3ff (diff)
downloadmeson-f5871f434a5b768ad9fcafa797a6db0286421842.zip
meson-f5871f434a5b768ad9fcafa797a6db0286421842.tar.gz
meson-f5871f434a5b768ad9fcafa797a6db0286421842.tar.bz2
environment.py: Detect all mips* architectures (#8108)
* environment.py: Detect all mips* architectures We have more than those values, like: mipsel mipsel-nf mips32el mips33el-nf mipsisa32r6 mipsisa32r6el So lets just detect them all. Sorry I forgot about 64bit and closed https://github.com/mesonbuild/meson/pull/8106 But now it even detects: mipsisa64r6 mipsisa64r6el * Make dcbaker happy
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index c157bb2..f7e7003 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -377,8 +377,11 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
trial = 'x86_64'
elif trial in {'sun4u', 'sun4v'}:
trial = 'sparc64'
- elif trial in {'mipsel', 'mips64el'}:
- trial = trial.rstrip('el')
+ elif trial.startswith('mips'):
+ if '64' not in trial:
+ trial = 'mips'
+ else:
+ trial = 'mips64'
elif trial in {'ip30', 'ip35'}:
trial = 'mips64'
@@ -433,7 +436,10 @@ def detect_cpu(compilers: CompilersDict):
# Make more precise CPU detection for Elbrus platform.
trial = platform.processor().lower()
elif trial.startswith('mips'):
- trial = trial.rstrip('el')
+ if '64' not in trial:
+ trial = 'mips'
+ else:
+ trial = 'mips64'
# Add more quirks here as bugs are reported. Keep in sync with
# detect_cpu_family() above.