aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-08-30 10:41:12 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-08-30 10:41:12 -0700
commitf073c3cfe16a81afbf31e85fd08603a8044c3ef1 (patch)
tree73d5a8eb82174124670d03890926e7730621f9b1 /mesonbuild/environment.py
parent78f8a286d06eb31f361d616098e59c0cfee2a911 (diff)
downloadmeson-f073c3cfe16a81afbf31e85fd08603a8044c3ef1.zip
meson-f073c3cfe16a81afbf31e85fd08603a8044c3ef1.tar.gz
meson-f073c3cfe16a81afbf31e85fd08603a8044c3ef1.tar.bz2
environment: correctly handle cpu value aarch64_be
Fixes #9191
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 3ad150d..a509087 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -314,6 +314,9 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
trial = 'x86'
elif trial == 'arm64':
trial = 'aarch64'
+ elif trial.startswith('aarch64'):
+ # This can be `aarch64_be`
+ trial = 'aarch64'
elif trial.startswith('arm') or trial.startswith('earm'):
trial = 'arm'
elif trial.startswith(('powerpc64', 'ppc64')):
@@ -373,10 +376,13 @@ def detect_cpu(compilers: CompilersDict) -> str:
# Same check as above for cpu_family
if any_compiler_has_define(compilers, '__i386__'):
trial = 'i686' # All 64 bit cpus have at least this level of x86 support.
- elif trial == 'aarch64':
+ elif trial.startswith('aarch64'):
# Same check as above for cpu_family
if any_compiler_has_define(compilers, '__arm__'):
trial = 'arm'
+ else:
+ # for aarch64_be
+ trial = 'aarch64'
elif trial.startswith('earm'):
trial = 'arm'
elif trial == 'e2k':