summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2020-06-08 08:52:10 +0200
committerChristian Mauderer <oss@c-mauderer.de>2020-07-23 18:33:01 +0200
commit37ad446d9dce3438d6d32e1caf56d3fdccdd2ad0 (patch)
tree07c58da4728ef0b40968eb0cbf6b409ec96f00d9
parentRemove support for epiphany target (diff)
downloadrtems-tools-37ad446d9dce3438d6d32e1caf56d3fdccdd2ad0.tar.bz2
trace: Use c++14 instead of c++11 if possible
llvm version 10 uses features from c++14 standard in the headers. With that, the record/record-main-lttng.cc doesn't build any more. This patch makes sure that c++14 is used if it is available.
-rw-r--r--trace/wscript6
1 files changed, 5 insertions, 1 deletions
diff --git a/trace/wscript b/trace/wscript
index 656f92b..53a1ab4 100644
--- a/trace/wscript
+++ b/trace/wscript
@@ -45,6 +45,7 @@ def configure(conf):
if conf.check(header_name='zlib.h', features='cxx', mandatory=False):
conf.check_cxx(lib = 'z')
conf.check_cxx(lib = 'ws2_32', mandatory=False)
+ conf.check_cxx(cxxflags='-std=c++14', mandatory=False, define_name="HAVE_STD_CXX14")
conf.write_config_header('config.h')
def build(bld):
@@ -60,7 +61,10 @@ def build(bld):
conf['warningflags'] = ['-Wall', '-Wextra', '-pedantic']
conf['optflags'] = bld.env.C_OPTS
conf['cflags'] = ['-pipe', '-g'] + conf['optflags']
- conf['cxxflags'] = ['-std=c++11'] + conf['cflags']
+ cxxstd = '-std=c++11'
+ if bld.env.HAVE_STD_CXX14:
+ cxxstd = '-std=c++14'
+ conf['cxxflags'] = [cxxstd] + conf['cflags']
conf['linkflags'] = ['-g']
conf['lib'] = []
if bld.env.LIB_WS2_32: