summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@arm.com>2010-08-23 11:18:42 -0500
committerAli Saidi <Ali.Saidi@arm.com>2010-08-23 11:18:42 -0500
commit6f24da359f3918671aef691990c205f9dc5b2845 (patch)
treec899a32d97d8b0a314e301c0c6d58a92ff4c0896 /SConstruct
parent03584ad439ce043f2ed7dde51f49e5dbb5ea8bce (diff)
downloadgem5-6f24da359f3918671aef691990c205f9dc5b2845.tar.xz
BUILD: GCC 4.4.1/2 have a bug in their auto-vectorizer that we trip on
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct8
1 files changed, 8 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index d210fc5b9..850c122ca 100644
--- a/SConstruct
+++ b/SConstruct
@@ -361,6 +361,14 @@ if main['GCC']:
main.Append(CCFLAGS='-fno-strict-aliasing')
main.Append(CCFLAGS=['-Wall', '-Wno-sign-compare', '-Wundef'])
main.Append(CXXFLAGS='-Wno-deprecated')
+ # Read the GCC version to check for versions with bugs
+ # Note CCVERSION doesn't work here because it is run with the CC
+ # before we override it from the command line
+ gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False)
+ if not compareVersions(gcc_version, '4.4.1') or \
+ not compareVersions(gcc_version, '4.4.2'):
+ print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.'
+ main.Append(CCFLAGS='-fno-tree-vectorize')
elif main['ICC']:
pass #Fix me... add warning flags once we clean up icc warnings
elif main['SUNCC']: