From patchwork Tue Mar 8 13:50:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nix X-Patchwork-Id: 11257 Received: (qmail 28239 invoked by alias); 8 Mar 2016 13:53:38 -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 28167 invoked by uid 89); 8 Mar 2016 13:53:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL, BAYES_20, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-spam-relays-external:sk:mail.es, HX-HELO:sk:mail.es, H*r:sk:mail.es, H*RU:sk:mail.es X-HELO: mail.esperi.org.uk From: Nix To: libc-alpha@sourceware.org Subject: [PATCH 13/18] Prohibit stack-protection if the compiler is not capable. Date: Tue, 8 Mar 2016 13:50:59 +0000 Message-Id: <1457445064-7107-14-git-send-email-nix@esperi.org.uk> In-Reply-To: <1457445064-7107-1-git-send-email-nix@esperi.org.uk> References: <1457445064-7107-1-git-send-email-nix@esperi.org.uk> X-DCC--Metrics: spindle 1282; Body=2 Fuz1=2 Fuz2=2 From: Nick Alcock 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