diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index c157bb201..f7e700363 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.