This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 13/18] Prohibit stack-protection if the compiler is not capable.
- From: Nix <nix at esperi dot org dot uk>
- To: libc-alpha at sourceware dot org
- Date: Tue, 8 Mar 2016 13:50:59 +0000
- Subject: [PATCH 13/18] Prohibit stack-protection if the compiler is not capable.
- Authentication-results: sourceware.org; auth=none
- References: <1457445064-7107-1-git-send-email-nix at esperi dot org dot uk>
From: Nick Alcock <nick.alcock@oracle.com>
We need support for __attribute__ ((__optimize__ ("-fno-stack-protector")))
if -fno-stack-protector is to work reliably.
v4: New.
* configure.ac [stack_protector && !libc_cv_cc_no_stack_protector]:
Error out in this case.
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index 38e9c27..9df57ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -665,6 +665,11 @@ AC_SUBST(stack_protector)
AC_SUBST(no_stack_protector)
if test -n "$stack_protector"; then
+ dnl We cannot work without the ability to disable -fstack-protector for
+ dnl specific functions.
+ if test $libc_cv_cc_no_stack_protector = no; then
+ AC_MSG_ERROR([--enable-stack-protector not supported without __attribute__ ((__optimize__ ("-fno-stack-protector"))).])
+ fi
dnl Don't run configure tests with stack-protection on, to avoid problems with
dnl bootstrapping.
no_ssp=-fno-stack-protector
--
2.7.0.198.g6dd47b6