[Git][NTPsec/ntpsec][master] waf: add tests for -lssp and -lssp_nonshared.
Gary E. Miller
gitlab at mg.gitlab.com
Wed Mar 29 23:30:55 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
7a82dca7 by Gary E. Miller at 2017-03-29T16:30:12-07:00
waf: add tests for -lssp and -lssp_nonshared.
Needed by older gcc to support stack protector.
- - - - -
1 changed file:
- wafhelpers/configure.py
Changes:
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -448,6 +448,19 @@ int main(int argc, char **argv) {
if ret:
ctx.env.LDFLAGS += ["-lbsd"]
+ # -lssp and -lssp_nonshared may be needed by older gcc to
+ # support "-fstack-protector-all"
+ ret = ctx.check_cc(lib="ssp", mandatory=False,
+ comment="libssp")
+ if ret:
+ ctx.env.LDFLAGS += ["-lssp"]
+
+ ret = ctx.check_cc(lib="ssp_nonshared", mandatory=False,
+ comment="libssp_nonshared")
+ if ret:
+ ctx.env.LDFLAGS += ["-lssp_nonshared"]
+
+
# Find OpenSSL. Must happen before function checks
# Versions older than 0.9.7d were deemed incompatible in NTP Classic.
SNIP_OPENSSL_VERSION_CHECK = """
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7a82dca7bb4ed6c84c759355a144815ebd50c081
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170329/d69bfbca/attachment.html>
More information about the vc
mailing list