[Git][NTPsec/ntpsec][master] wscript: fix build without stack-protector

Matt Selsky (@selsky) gitlab at mg.gitlab.com
Tue Mar 28 13:05:36 UTC 2023



Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
15862410 by Fabrice Fontaine at 2023-03-28T07:40:45+00:00
wscript: fix build without stack-protector

-fstack-protector-all can depends on ssp library availability (e.g. on musl) so
move the test from cc_test_flags to ld_hardening_flags, this will avoid the
following build failure:

Checking for library ssp                 : not found
Checking for library ssp_nonshared       : not found
Checking if C compiler supports -fstack-protector-all : yes

[...]

The configuration failed
(complete log in /home/autobuild/autobuild/instance-2/output-1/build/ntpsec-1_2_2/build/config.log)

Fixes:
 - http://autobuild.buildroot.org/results/f38abc6b7f8464836231192cfe078a5b27319a8a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>

- - - - -


1 changed file:

- wscript


Changes:

=====================================
wscript
=====================================
@@ -298,7 +298,6 @@ def configure(ctx):
         ctx.env.LDFLAGS += ["-lssp_nonshared"]
 
     cc_test_flags = [
-        ('f_stack_protector_all', '-fstack-protector-all'),
         ('PIC', '-fPIC'),
         ('PIE', '-pie -fPIE'),
         # this quiets most of macOS warnings on -fpie
@@ -332,6 +331,7 @@ def configure(ctx):
 
     # Check which linker flags are supported
     ld_hardening_flags = [
+        ('f_stack_protector_all', '-fstack-protector-all'),
         ("z_now", "-Wl,-z,now"),     # no deferred symbol resolution
     ]
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/15862410de61d478a4b9aee5f5107889cfa9d125

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/15862410de61d478a4b9aee5f5107889cfa9d125
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20230328/087600c9/attachment.htm>


More information about the vc mailing list