build: require gcc >= 5.3 and switch to C++14
Change-Id: Ifb805ced42e9f8aedce473c1fe91f68b27acefec
Refs: #3076, #4462
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 54db7ea..e690290 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -15,14 +15,14 @@
errmsg = ''
warnmsg = ''
if cxx == 'gcc':
- if ccver < (4, 8, 2):
+ if ccver < (5, 3, 0):
errmsg = ('The version of gcc you are using is too old.\n'
- 'The minimum supported gcc version is 4.8.2.')
+ 'The minimum supported gcc version is 5.3.0.')
conf.flags = GccFlags()
elif cxx == 'clang':
- if ccver < (3, 4, 0):
+ if ccver < (3, 5, 0):
errmsg = ('The version of clang you are using is too old.\n'
- 'The minimum supported clang version is 3.4.0.')
+ 'The minimum supported clang version is 3.5.0.')
conf.flags = ClangFlags()
else:
warnmsg = 'Note: %s compiler is unsupported' % cxx
@@ -39,7 +39,7 @@
conf.areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
- # General flags are always applied (e.g., selecting C++11 mode)
+ # General flags are always applied (e.g., selecting C++ language standard)
generalFlags = conf.flags.getGeneralFlags(conf)
conf.add_supported_cxxflags(generalFlags['CXXFLAGS'])
conf.add_supported_linkflags(generalFlags['LINKFLAGS'])
@@ -128,7 +128,7 @@
"""
def getGeneralFlags(self, conf):
flags = super(GccBasicFlags, self).getGeneralFlags(conf)
- flags['CXXFLAGS'] += ['-std=c++11']
+ flags['CXXFLAGS'] += ['-std=c++14']
return flags
def getDebugFlags(self, conf):
@@ -164,16 +164,12 @@
class GccFlags(GccBasicFlags):
def getDebugFlags(self, conf):
flags = super(GccFlags, self).getDebugFlags(conf)
- if self.getCompilerVersion(conf) < (5, 1, 0):
- flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
- flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
+ flags['CXXFLAGS'] += ['-fdiagnostics-color']
return flags
def getOptimizedFlags(self, conf):
flags = super(GccFlags, self).getOptimizedFlags(conf)
- if self.getCompilerVersion(conf) < (5, 1, 0):
- flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
- flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
+ flags['CXXFLAGS'] += ['-fdiagnostics-color']
return flags
class ClangFlags(GccBasicFlags):