[Git][NTPsec/ntpsec][master] waf: show compiler version

Gary E. Miller gitlab at mg.gitlab.com
Wed Feb 15 00:39:51 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
a686a549 by Gary E. Miller at 2017-02-14T16:39:29-08:00
waf: show compiler version

- - - - -


1 changed file:

- wafhelpers/configure.py


Changes:

=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -54,6 +54,8 @@ def cmd_configure(ctx, config):
     ctx.setenv('host', ctx.env.derive())
 
     ctx.load('compiler_c')
+    ctx.start_msg('Checking compiler version')
+    ctx.end_msg('%s.%s.%s' % ctx.env.CC_VERSION)
     ctx.load('bison')
 
     for opt in opt_map:
@@ -239,6 +241,7 @@ def cmd_configure(ctx, config):
                     "-Wl,--strip-all",    # Strip binaries
                     ]
     else:
+        # gcc, probably
         # -O1 will turn on -D_FORTIFY_SOURCE=2 for us
         ctx.env.CFLAGS += [
             "-fstack-protector-all",    # hardening
@@ -249,7 +252,7 @@ def cmd_configure(ctx, config):
             "-Wl,-z,now",      # hardening, no deferred symbol resolution
             ]
 
-        if 5 <=ctx.env.CC_VERSION[0]:
+        if 5 <= ctx.env.CC_VERSION[0]:
             # gcc >= 5.0
             ctx.env.CFLAGS += [
                 "-fPIE",                    # hardening



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a686a54912a51ad09a7b75dd6a2cdc1163d9f57a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170215/174f1720/attachment.html>


More information about the vc mailing list