aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-08-24 21:38:43 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-08-24 21:38:43 +0300
commitaa7b70efcedf16dee674deee4545ace5f2393004 (patch)
tree544dc4369fbe0bd0005708bda23565ba574c65be
parent696f72da1b60c6f255e8a96ed578683eccc6124c (diff)
downloadmeson-aa7b70efcedf16dee674deee4545ace5f2393004.zip
meson-aa7b70efcedf16dee674deee4545ace5f2393004.tar.gz
meson-aa7b70efcedf16dee674deee4545ace5f2393004.tar.bz2
Some fixes for C++ cross compiler.
-rw-r--r--environment.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/environment.py b/environment.py
index af4e9d9..1625b44 100644
--- a/environment.py
+++ b/environment.py
@@ -310,7 +310,14 @@ class CPPCompiler(CCompiler):
pc.wait()
if pc.returncode != 0:
raise EnvironmentException('Compiler %s can not compile programs.' % self.name_string())
- pe = subprocess.Popen(binary_name)
+ if self.is_cross:
+ if self.exe_wrapper is None:
+ # Can't check if the binaries run so we have to assume they do
+ return
+ cmdlist = self.exe_wrapper + [binary_name]
+ else:
+ cmdlist = [binary_name]
+ pe = subprocess.Popen(cmdlist)
pe.wait()
if pe.returncode != 0:
raise EnvironmentException('Executables created by C++ compiler %s are not runnable.' % self.name_string())
@@ -839,7 +846,7 @@ class Environment():
continue
out = p.communicate()[0]
out = out.decode()
- if (out.startswith('c++ ') or out.startswith('g++') or 'GCC' in out) and \
+ if (out.startswith('c++ ') or 'g++' in out or 'GCC' in out) and \
'Free Software Foundation' in out:
return GnuCPPCompiler(ccache + [compiler], is_cross, exe_wrap)
if 'apple' in out and 'Free Software Foundation' in out: