package/ntpsec: fix build without stack-protector
PATCH 1/1 package/ntpsec: fix build without stack-protector
Fix the following build failure without stack-protector raised since the addition of the package in commit 27b8d0ba8c4004819e092fb81c0f64f284b3aa4a:
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
- http://autobuild.buildroot.org/results/62be818e2f2eac07b4a2de6f4a8898cc4cc05b1f
--- ...pt-fix-build-without-stack-protector.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package/ntpsec/0002-wscript-fix-build-without-stack-protector.patch
package/ntpsec/0002-wscript-fix-build-without-stack-protector.patch new file +50 -0
@@ -0,0 +1,50 @@ +From 0a3ce09c14eb9c7e36aa30a4dafe40e56676d678 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 24 Feb 2023 11:33:32 +0100 +Subject: [PATCH] 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 <[email protected]> +[Upstream status: https://github.com/ntpsec/ntpsec/pull/6] +--- + wscript | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wscript b/wscript +index be396b33b..f301809fc 100644 +--- a/wscript ++++ b/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 + ] + +-- +2.39.1 +
Signature · 6 lines
2.39.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 17 lines · On Fri, 24 Feb 2023 11:51:48 +0100 Fabrice Fontaine…
Fix the following build failure without stack-protector raised since the addition of the package in commit
27b8d0ba8c4004819e092fb81c0f64f284b3aa4a:Checking for library ssp : not found
Checking for libraryssp_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
- http://autobuild.buildroot.org/results/62be818e2f2eac07b4a2de6f4a8898cc4cc05b1f
Quoted 5 lines
Signed-off-by Fabrice Fontaine <[email protected]>--- ...pt-fix-build-without-stack-protector.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package/ntpsec/0002-wscript-fix-build-without-stack-protector.patch
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Fix the following build failure without stack-protector raised since the addition of the package in commit
27b8d0ba8c4004819e092fb81c0f64f284b3aa4a:Checking for library ssp : not found
Checking for libraryssp_nonshared: not found
Checking if C compiler supports -fstack-protector-all : yes[...]
Quoted 8 lines
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
- http://autobuild.buildroot.org/results/62be818e2f2eac07b4a2de6f4a8898cc4cc05b1fSigned-off-by Fabrice Fontaine <[email protected]>
Committed to 2022.11.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot