diff options
author | nia <nia@NetBSD.org> | 2019-08-23 16:27:53 +0100 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-08-23 13:10:25 -0700 |
commit | 246b49fe75e8f882f26a0551f89c42ca20ee50c2 (patch) | |
tree | 4062caed499e231c1cf7a089030c8791b60b545a /mesonbuild | |
parent | 315ab997b49bba92c958a88f5eebe7aa232739f8 (diff) | |
download | meson-246b49fe75e8f882f26a0551f89c42ca20ee50c2.zip meson-246b49fe75e8f882f26a0551f89c42ca20ee50c2.tar.gz meson-246b49fe75e8f882f26a0551f89c42ca20ee50c2.tar.bz2 |
Support NetBSD aarch64 and earm.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/environment.py | 8 | ||||
-rw-r--r-- | mesonbuild/mesonlib.py | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 2630ae9..892bba7 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -235,7 +235,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: """ if mesonlib.is_windows(): trial = detect_windows_arch(compilers) - elif mesonlib.is_freebsd() or mesonlib.is_openbsd(): + elif mesonlib.is_freebsd() or mesonlib.is_netbsd() or mesonlib.is_openbsd(): trial = platform.processor().lower() else: trial = platform.machine().lower() @@ -243,7 +243,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: trial = 'x86' elif trial == 'bepc': trial = 'x86' - elif trial.startswith('arm'): + elif trial.startswith('arm') or trial.startswith('earm'): trial = 'arm' elif trial.startswith(('powerpc64', 'ppc64')): trial = 'ppc64' @@ -280,7 +280,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: def detect_cpu(compilers: CompilersDict): if mesonlib.is_windows(): trial = detect_windows_arch(compilers) - elif mesonlib.is_freebsd() or mesonlib.is_openbsd(): + elif mesonlib.is_freebsd() or mesonlib.is_netbsd() or mesonlib.is_openbsd(): trial = platform.processor().lower() else: trial = platform.machine().lower() @@ -294,6 +294,8 @@ def detect_cpu(compilers: CompilersDict): # Same check as above for cpu_family if any_compiler_has_define(compilers, '__arm__'): trial = 'arm' + elif trial.startswith('earm'): + trial = 'arm' elif trial == 'e2k': # Make more precise CPU detection for Elbrus platform. trial = platform.processor().lower() diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index d90c188..bf87f0f 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -459,6 +459,9 @@ def is_debianlike() -> bool: def is_dragonflybsd() -> bool: return platform.system().lower() == 'dragonfly' +def is_netbsd() -> bool: + return platform.system().lower() == 'netbsd' + def is_freebsd() -> bool: return platform.system().lower() == 'freebsd' |