diff options
author | Joel Sherrill <joel@rtems.org> | 2021-03-30 16:14:07 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2021-04-02 09:29:57 -0500 |
commit | c71a8363100addb14d0ef6dda8278ac2eeb54b1b (patch) | |
tree | d9cfd593e68ca0041d8ff854f65ff01d11355081 | |
parent | misc/wscript: Specify C language version (diff) | |
download | rtems-tools-c71a8363100addb14d0ef6dda8278ac2eeb54b1b.tar.bz2 |
trace/wscript: Specify C language version
CentOS 7 has gcc 4.8 which defaults to C90 and this results in warnings
for code that is valid C99 but not C90.
-rw-r--r-- | trace/wscript | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/trace/wscript b/trace/wscript index 53a1ab4..a3dd5d5 100644 --- a/trace/wscript +++ b/trace/wscript @@ -60,11 +60,12 @@ def build(bld): conf['includes'] = ['.', 'record', 'record/inih'] conf['warningflags'] = ['-Wall', '-Wextra', '-pedantic'] conf['optflags'] = bld.env.C_OPTS - conf['cflags'] = ['-pipe', '-g'] + conf['optflags'] + cstd = '-std=c99' + conf['cflags'] = [cstd] + ['-pipe', '-g'] + conf['optflags'] cxxstd = '-std=c++11' if bld.env.HAVE_STD_CXX14: cxxstd = '-std=c++14' - conf['cxxflags'] = [cxxstd] + conf['cflags'] + conf['cxxflags'] = [cxxstd] + ['-pipe', '-g'] + conf['optflags'] conf['linkflags'] = ['-g'] conf['lib'] = [] if bld.env.LIB_WS2_32: |