From patchwork Sun May 6 07:02:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Zamyatin X-Patchwork-Id: 157052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E36DBB6FC2 for ; Sun, 6 May 2012 17:02:47 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1336892571; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=zAW97Bk y3CqwLO4cZHYCWOOGy1g=; b=mLq0n8M+ruvnsPkQ0r3QYrb59oRvuQAXOFXYmRr nW5UH8dt3wicQPThUeKYBJL0fz0pxN3uE4I9YLiLfdM2Lh7WMeyRIDi10MO1LcvI u+ZdxBHC+QGWRtkEQ4Dx0ydGxjA4rwC2z3KVf25LT+zky2IkzF6DnRTcSJ37JYd2 kagE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=avNOkzFotwsBFLQeKNTeKdFbyXVvVXdbLDMSvgdKaAHNiHpmKZooG/JNKSypdb JW09x5FqCsLKeCd8H8+Mm5Mpu7Ihz6MhV9wsqLxHQ/BpaPvggjJINkuY1EG7/3kv sclVrVV5ZeEx6hdiwVgtc+HTj0V212D74Z9xW1yCogVbY=; Received: (qmail 7981 invoked by alias); 6 May 2012 07:02:41 -0000 Received: (qmail 7967 invoked by uid 22791); 6 May 2012 07:02:39 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pz0-f49.google.com (HELO mail-pz0-f49.google.com) (209.85.210.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 06 May 2012 07:02:23 +0000 Received: by dadm1 with SMTP id m1so1416731dad.8 for ; Sun, 06 May 2012 00:02:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.212.225 with SMTP id nn1mr5510209pbc.114.1336287742567; Sun, 06 May 2012 00:02:22 -0700 (PDT) Received: by 10.68.65.52 with HTTP; Sun, 6 May 2012 00:02:22 -0700 (PDT) Date: Sun, 6 May 2012 11:02:22 +0400 Message-ID: Subject: [PATCH, Android] Stack protector enabling for Android target From: Igor Zamyatin To: gcc-patches@gcc.gnu.org Cc: maxim@codesourcery.com, pavel.v.chupin@gmail.com Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi! The patch enables stack protector for Android. Android targets don't contain necessary information in features.h so we explicitly enable stack protector for Android. Bootstrapped and regtested on x86_64. Ok to commit? Thanks, Igor 2012-05-06 Igor Zamyatin * configure.ac: Stack protector enabling for Android targets. * configure: Regenerate. diff --git a/gcc/configure.ac b/gcc/configure.ac index 86b4bea..c1012d6 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4545,6 +4545,8 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library, gcc_cv_libc_provides_ssp, [gcc_cv_libc_provides_ssp=no case "$target" in + *-android*) + gcc_cv_libc_provides_ssp=yes;; *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) [# glibc 2.4 and later provides __stack_chk_fail and # either __stack_chk_guard, or TLS access to stack guard canary.