diff options
author | Eric Dodd <eric.e.dodd@gmail.com> | 2020-05-21 08:45:44 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-06-10 20:21:47 +0300 |
commit | b9ef132576905049fdf3945ca863eb2674bcc777 (patch) | |
tree | eee40ca09da3c0790fa6469504bcfccca1bcd937 | |
parent | 29ef4478df6d3aaca40c7993f125b29409be1de2 (diff) | |
download | meson-irixfix.tar.gz |
Updated to resolve issue identifying SGI CPUs on IRIX systemsirixfix
-rw-r--r-- | mesonbuild/envconfig.py | 6 | ||||
-rw-r--r-- | mesonbuild/environment.py | 3 | ||||
-rw-r--r-- | mesonbuild/mesonlib.py | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index b74be3521..b0dde6555 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.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. diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 8fad6288b..1b63111b4 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -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 diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index b901ec98b..2c1f4a856 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -507,6 +507,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' @@ -727,7 +729,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' |