Detect powerpc processors on FreeBSD. Closes #4397.

pull/4349/head
Jussi Pakkanen 6 years ago
parent 2256e6314b
commit 0a217f40d7
  1. 13
      mesonbuild/environment.py

@ -211,6 +211,19 @@ def detect_cpu_family(compilers):
return 'arm' return 'arm'
if trial.startswith('ppc64'): if trial.startswith('ppc64'):
return 'ppc64' return 'ppc64'
if trial == 'powerpc':
# FreeBSD calls both ppc and ppc64 "powerpc".
# https://github.com/mesonbuild/meson/issues/4397
try:
p, stdo, _ = Popen_safe(['uname', '-p'])
except (FileNotFoundError, PermissionError):
# Not much to go on here.
if sys.maxsize > 2**32:
return 'ppc64'
return 'ppc'
if 'powerpc64' in stdo:
return 'ppc64'
return 'ppc'
if trial in ('amd64', 'x64'): if trial in ('amd64', 'x64'):
trial = 'x86_64' trial = 'x86_64'
if trial == 'x86_64': if trial == 'x86_64':

Loading…
Cancel
Save