Updated to resolve issue identifying SGI CPUs on IRIX systems

pull/7297/head
Eric Dodd 5 years ago committed by Jussi Pakkanen
parent f6a842821b
commit 71d68a940b
  1. 6
      mesonbuild/envconfig.py
  2. 3
      mesonbuild/environment.py
  3. 4
      mesonbuild/mesonlib.py

@ -64,7 +64,7 @@ known_cpu_families = (
'wasm32',
'wasm64',
'x86',
'x86_64'
'x86_64',
)
# It would feel more natural to call this "64_BIT_CPU_FAMILES", but
@ -299,6 +299,10 @@ class MachineInfo:
"""
return self.system == 'gnu'
def is_irix(self) -> bool:
"""Machine is IRIX?"""
return self.system.startswith('irix')
# Various prefixes and suffixes for import libraries, shared libraries,
# static libraries, and executables.
# Versioning is added to these names in the backends as-needed.

@ -344,6 +344,9 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
trial = 'sparc64'
elif trial in {'mipsel', 'mips64el'}:
trial = trial.rstrip('el')
elif trial in {'ip30', 'ip35'}:
trial = 'mips64'
# On Linux (and maybe others) there can be any mixture of 32/64 bit code in
# the kernel, Python, system, 32-bit chroot on 64-bit host, etc. The only

@ -509,6 +509,8 @@ def is_netbsd() -> bool:
def is_freebsd() -> bool:
return platform.system().lower() == 'freebsd'
def is_irix() -> bool:
return platform.system().startswith('irix')
def is_hurd() -> bool:
return platform.system().lower() == 'gnu'
@ -733,7 +735,7 @@ def default_libdir() -> str:
return 'lib/' + archpath
except Exception:
pass
if is_freebsd():
if is_freebsd() or is_irix():
return 'lib'
if os.path.isdir('/usr/lib64') and not os.path.islink('/usr/lib64'):
return 'lib64'

Loading…
Cancel
Save