summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-07-03 10:14:15 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2015-07-03 10:14:15 -0400
commitc466d55a260b04bf9e55192cdb3fe547a89e149d (patch)
tree9ed72e23ea1ea563e50dfa4fc146e7b8974c15cd /src/SConscript
parent57971248f662e932a4593529cba83ce54961f4ed (diff)
downloadgem5-c466d55a260b04bf9e55192cdb3fe547a89e149d.tar.xz
scons: Bump compiler requirement to gcc >= 4.7 and clang >= 3.1
This patch updates the compiler minimum requirement to gcc 4.7 and clang 3.1, thus allowing: 1. Explicit virtual overrides (no need for M5_ATTR_OVERRIDE) 2. Non-static data member initializers 3. Template aliases 4. Delegating constructors This patch also enables a transition from --std=c++0x to --std=c++11.
Diffstat (limited to 'src/SConscript')
-rwxr-xr-xsrc/SConscript18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/SConscript b/src/SConscript
index a479464a1..95c8f002f 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -1015,7 +1015,8 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
# Add additional warnings here that should not be applied to
# the SWIG generated code
- new_env.Append(CXXFLAGS='-Wmissing-declarations')
+ new_env.Append(CXXFLAGS=['-Wmissing-declarations',
+ '-Wdelete-non-virtual-dtor'])
if env['GCC']:
# Depending on the SWIG version, we also need to supress
@@ -1023,15 +1024,8 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
# initializers.
swig_env.Append(CCFLAGS=['-Wno-uninitialized',
'-Wno-missing-field-initializers',
- '-Wno-unused-but-set-variable'])
-
- # If gcc supports it, also warn for deletion of derived
- # classes with non-virtual desctructors. For gcc >= 4.7 we
- # also have to disable warnings about the SWIG code having
- # potentially uninitialized variables.
- if compareVersions(env['GCC_VERSION'], '4.7') >= 0:
- new_env.Append(CXXFLAGS='-Wdelete-non-virtual-dtor')
- swig_env.Append(CCFLAGS='-Wno-maybe-uninitialized')
+ '-Wno-unused-but-set-variable',
+ '-Wno-maybe-uninitialized'])
# Only gcc >= 4.9 supports UBSan, so check both the version
# and the command-line option before adding the compiler and
@@ -1042,10 +1036,6 @@ def makeEnv(env, label, objsfx, strip = False, **kwargs):
new_env.Append(LINKFLAGS='-fsanitize=undefined')
if env['CLANG']:
- # Always enable the warning for deletion of derived classes
- # with non-virtual destructors
- new_env.Append(CXXFLAGS=['-Wdelete-non-virtual-dtor'])
-
swig_env.Append(CCFLAGS=[
# Some versions of SWIG can return uninitialized values
'-Wno-sometimes-uninitialized',