[Git][NTPsec/ntpsec][master] 2 commits: waf debug: add new warnings in debug mode. Only 1k more messages to fix
Gary E. Miller
gitlab at mg.gitlab.com
Fri Apr 7 00:47:38 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
4c8bfa14 by Gary E. Miller at 2017-04-06T17:40:25-07:00
waf debug: add new warnings in debug mode. Only 1k more messages to fix
A lot of these actually look valid. A few header file changes will
fix a lot of them.
- - - - -
ca43f77e by Gary E. Miller at 2017-04-06T17:46:25-07:00
waf: unlink --enable-debug and --enable-debug-gdb
Always strip binaries and use LOT, unless --enable-debug-gdb
- - - - -
1 changed file:
- wafhelpers/configure.py
Changes:
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -262,10 +262,13 @@ def cmd_configure(ctx, config):
if ctx.options.enable_debug_gdb:
ctx.env.CFLAGS += ["-g"]
- ctx.options.enable_debug = 1
else:
+ # not gdb debugging
cc_test_flags += [
- ('LTO', '-flto'),
+ ('LTO', '-flto'), # link time optimization
+ ]
+ ld_hardening_flags += [
+ ('stripall', "-Wl,--strip-all"), # Strip binaries
]
# Check which linker flags are supported
@@ -278,15 +281,38 @@ def cmd_configure(ctx, config):
ctx.env.BISONFLAGS += ["--debug"]
# turn on some annoying warnings
ctx.env.CFLAGS += [
+ # "-Wall", # for masochists
+ #"-Wsuggest-attribute=const", # fails build
+ "-Waggregate-return",
+ "-Wbad-function-cast",
+ "-Wcast-align",
+ "-Wcast-qual",
+ "-Wdisabled-optimization",
"-Wfloat-equal", # Not Ready For Prime Time
+ "-Wformat",
+ "-Wformat-nonliteral", # needs -Wformat
+ "-Wformat-security", # needs -Wformat
+ "-Wformat-signedness", # needs =Wformat
+ "-Wimplicit-function-declaration",
+ "-Winit-self",
+ "-Winline",
+ "-Winvalid-pch",
"-Wmissing-declarations", # Not Ready For Primt Time
+ "-Wmissing-format-attribute",
+ "-Wmultichar",
+ "-Wnested-externs",
+ "-Wpacked",
+ # "-Wpadded", # duck... over 3k warnings
+ "-Wpointer-arith",
+ "-Wredundant-decls",
+ "-Wshadow",
"-Wsign-conversion", # fails on Solaris and OpenBSD 6
+ "-Wsuggest-attribute=noreturn",
+ "-Wsuggest-attribute=pure",
+ "-Wswitch-default",
+ "-Wwrite-strings",
+
]
- else:
- # not debugging
- ld_hardening_flags += [
- ('stripall', "-Wl,--strip-all"), # Strip binaries
- ]
ctx.env.CFLAGS += [
# -O1 will turn on -D_FORTIFY_SOURCE=2 for us
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/1755775060f4cda94f2eba4309fe8b3644eeea0d...ca43f77eaa51a99f2a22508524113c7aeee8ce56
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170407/3297ca02/attachment.html>
More information about the vc
mailing list