summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-06-03 15:32:37 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-06-03 15:32:37 +0000
commiteb37119975961abde36e069326873606e58dd022 (patch)
tree4a86f2546f9c06fd12cdbd2761e2d3dfde8bddde /wscript
parentb12f624890216d46aa20a51ae524abd77eb2e5b4 (diff)
check for gcc 4.5 and prohibit compilation with optimization if found
git-svn-id: svn://localhost/ardour2/branches/3.0@7219 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'wscript')
-rw-r--r--wscript14
1 files changed, 13 insertions, 1 deletions
diff --git a/wscript b/wscript
index f7fe4adee0..9b41223a84 100644
--- a/wscript
+++ b/wscript
@@ -44,6 +44,12 @@ def fetch_svn_revision (path):
cmd = "LANG= svn info " + path + " | awk '/^Revision:/ { print $2}'"
return commands.getoutput(cmd)
+def fetch_gcc_version ():
+ cmd = "LANG= gcc --version"
+ output = commands.getoutput(cmd).splitlines()
+ version = output[0].split(' ')[2].split('.')
+ return version
+
def fetch_git_revision (path):
cmd = "LANG= git log --abbrev HEAD^..HEAD " + path
output = commands.getoutput(cmd).splitlines()
@@ -375,7 +381,13 @@ def configure(conf):
conf.env['VERSION'] = VERSION
autowaf.set_recursive()
autowaf.configure(conf)
-
+
+ gcc_versions = fetch_gcc_version()
+ if 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'
+ exit (1)
+
if sys.platform == 'darwin':
#
# Define OSX as a uselib to use when compiling