aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-01-28 09:58:08 -0800
committerGitHub <noreply@github.com>2020-01-28 09:58:08 -0800
commit3d60665885132cceccc7d80640a5b4735d6a7d48 (patch)
treee284a49e9c2b66c31d8dffede7db4703f2aafb4a /mesonbuild/environment.py
parent0fe485a100ee556bf1d600e6bb87640641b67a76 (diff)
parentee6c2c87fc238e673c609ad7200bd0aa66af03b4 (diff)
downloadmeson-3d60665885132cceccc7d80640a5b4735d6a7d48.zip
meson-3d60665885132cceccc7d80640a5b4735d6a7d48.tar.gz
meson-3d60665885132cceccc7d80640a5b4735d6a7d48.tar.bz2
Merge pull request #6455 from makise-homura/elbrus_0.53.0
Elbrus support is broken in 0.53.0, so fixing it
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 58c9e99..ef9480b 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -586,11 +586,19 @@ class Environment:
self.default_objcpp = ['c++', 'g++']
self.default_cs = ['csc', 'mcs']
else:
- self.default_c = ['cc', 'gcc', 'clang', 'pgcc', 'icc']
- self.default_cpp = ['c++', 'g++', 'clang++', 'pgc++', 'icpc']
+ if platform.machine().lower() == 'e2k':
+ # There are no objc or objc++ compilers for Elbrus,
+ # and there's no clang which can build binaries for host.
+ self.default_c = ['cc', 'gcc', 'lcc']
+ self.default_cpp = ['c++', 'g++', 'l++']
+ self.default_objc = []
+ self.default_objcpp = []
+ else:
+ self.default_c = ['cc', 'gcc', 'clang', 'pgcc', 'icc']
+ self.default_cpp = ['c++', 'g++', 'clang++', 'pgc++', 'icpc']
+ self.default_objc = ['cc', 'gcc', 'clang']
+ self.default_objcpp = ['c++', 'g++', 'clang++']
self.default_fortran = ['gfortran', 'flang', 'pgfortran', 'ifort', 'g95']
- self.default_objc = ['cc', 'gcc', 'clang']
- self.default_objcpp = ['c++', 'g++', 'clang++']
self.default_cs = ['mcs', 'csc']
self.default_d = ['ldc2', 'ldc', 'gdc', 'dmd']
self.default_java = ['javac']
@@ -939,6 +947,7 @@ class Environment:
cls = GnuCCompiler if lang == 'c' else GnuCPPCompiler
linker = self._guess_nix_linker(compiler, cls, for_machine)
+
return cls(
ccache + compiler, version, for_machine, is_cross,
info, exe_wrap, defines, full_version=full_version,
@@ -1258,7 +1267,7 @@ class Environment:
popen_exceptions[' '.join(compiler + arg)] = e
continue
version = search_version(out)
- if 'Free Software Foundation' in out or ('e2k' in out and 'lcc' in out):
+ if 'Free Software Foundation' in out:
defines = self.get_gnu_compiler_defines(compiler)
if not defines:
popen_exceptions[' '.join(compiler)] = 'no pre-processor defines'