From b7198760955ad27ab766d4a721bf0b8a9eecd3e1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 23 Apr 2011 00:14:12 +0000 Subject: [PATCH] Patch from pablomme to fix GCC version check to use the same gcc as will be used for the compile (#3945). git-svn-id: svn://localhost/ardour2/branches/3.0@9413 d708f5d6-7413-0410-9779-e7cbd77b26cf --- wscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wscript b/wscript index a41a9358f0..8ae4ccbe20 100644 --- a/wscript +++ b/wscript @@ -52,8 +52,8 @@ def fetch_svn_revision (path): cmd = "LANG= svn info " + path + " | awk '/^Revision:/ { print $2}'" return subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines() -def fetch_gcc_version (): - cmd = "LANG= gcc --version" +def fetch_gcc_version (CC): + cmd = "LANG= %s --version" % CC output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines() o = output[0].decode('utf-8') version = o.split(' ')[2].split('.') @@ -415,7 +415,7 @@ def configure(conf): autowaf.configure(conf) autowaf.display_header('Ardour Configuration') - gcc_versions = fetch_gcc_version() + gcc_versions = fetch_gcc_version(str(conf.env['CC'])) if not Options.options.debug and gcc_versions[0] == '4' and gcc_versions[1] > '4': print('Version 4.5 of gcc is not ready for use when compiling Ardour with optimization.') print('Please use a different version or re-configure with --debug')