[Git][NTPsec/ntpsec][master] waf: yet another test for c compiler options
Gary E. Miller
gitlab at mg.gitlab.com
Mon Feb 20 20:10:59 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
483d160e by Gary E. Miller at 2017-02-20T12:10:48-08:00
waf: yet another test for c compiler options
- - - - -
1 changed file:
- wafhelpers/configure.py
Changes:
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -228,11 +228,18 @@ def cmd_configure(ctx, config):
("-z now", "-Wl,-z,now"), # no deferred symbol resolution
]
+ FRAGMENT='''
+int main(int argc, char **argv) {
+ (void)argc; (void)argv;
+ return 0;
+}
+'''
+
# check if C compiler supports some flags
for (name, ccflag) in cc_test_flags:
ctx.check_cc(define_name='HAS_' + name,
- cflags=ccflag,
- fragment='int main() {}\n',
+ cflags=ccflag + ' -Werror',
+ fragment=FRAGMENT,
mandatory=False,
msg='Checking if C compiler supports ' + name,)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/483d160e27ffd110802d9c0c8a49f82ed0e4933b
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170220/09cca571/attachment.html>
More information about the vc
mailing list