[Git][NTPsec/ntpsec][master] Revert "waf: check for c compilter flags."
Gary E. Miller
gitlab at mg.gitlab.com
Sun Feb 19 22:19:09 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
50ace12d by Gary E. Miller at 2017-02-19T14:18:36-08:00
Revert "waf: check for c compilter flags."
This fixed Debian 7, broke everything else...
This reverts commit 33f7d447235407f132b7a6a1b75028c64d757c34.
- - - - -
1 changed file:
- wafhelpers/configure.py
Changes:
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -230,20 +230,11 @@ def cmd_configure(ctx, config):
# check if C compiler supports some flags
for (name, ccflag) in cc_test_flags:
- cmd = [ctx.env.CC_NAME, ccflag]
- # print("cmd: %s" % cmd)
- ctx.start_msg("Checking for compiler hardening flag: %s" % name)
- try:
- ctx.cmd_and_log(cmd)
- except Exception as e:
- if not any(word in e.stderr for word
- in ['ignored', 'illegal', 'unknown', 'unrecognized']):
- ctx.env.CFLAGS += [ccflag]
- ctx.end_msg("yes")
- ctx.env['HAS_' + name] = True
- else:
- ctx.env['HAS_' + name] = False
- ctx.end_msg("no", color="YELLOW")
+ ctx.check_cc(define_name='HAS_' + name,
+ cflags=ccflag,
+ fragment='int main() {}\n',
+ mandatory=False,
+ msg='Checking if C compiler supports ' + name,)
# We require some things that C99 doesn't enable, like pthreads.
# Thus -std=gnu99 rather than -std=c99 here, if the compiler supports
@@ -290,7 +281,7 @@ def cmd_configure(ctx, config):
for (name, ldflag) in ld_hardening_flags:
cmd = [ctx.env.CC_NAME, ldflag]
# print("cmd: %s" % cmd)
- ctx.start_msg("Checking for linker hardening flag: %s" % name)
+ ctx.start_msg("Checking if linker supports hardening flag: %s" % name)
try:
ctx.cmd_and_log(cmd)
except Exception as e:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/50ace12dd011b3aa138543c9cca31bc40bdfa5cd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170219/ef335b2d/attachment.html>
More information about the vc
mailing list