From patchwork Sun Feb 28 16:41:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nix X-Patchwork-Id: 11126 Received: (qmail 84587 invoked by alias); 28 Feb 2016 16:41:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 84374 invoked by uid 89); 28 Feb 2016 16:41:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=UD:7.0.198.g6dd47b6, UD:2.7.0.198.g6dd47b6, sk:2.7.0.1, sk:2701 X-HELO: mail.esperi.org.uk From: Nix To: libc-alpha@sourceware.org Subject: [PATCH 13/16] Prohibit stack-protection if the compiler is not capable. Date: Sun, 28 Feb 2016 16:41:32 +0000 Message-Id: <1456677695-29778-14-git-send-email-nix@esperi.org.uk> In-Reply-To: <1456677695-29778-1-git-send-email-nix@esperi.org.uk> References: <1456677695-29778-1-git-send-email-nix@esperi.org.uk> X-DCC-URT-Metrics: spindle 1060; Body=1 Fuz1=1 Fuz2=1 From: Nick Alcock We need support for __attribute__ ((__optimize__ ("-fno-stack-protector"))) if -fno-stack-protector is to work reliably. v4: New. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 55bfe89..97ac691 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