From patchwork Thu Nov 22 14:39:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 201053 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 E4B3E2C0106 for ; Fri, 23 Nov 2012 01:39:31 +1100 (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=1354199972; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Subject:Message-ID:MIME-Version: Content-Type:Content-Disposition:User-Agent:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=SQLQSCQttE3KFpHusRwtDggInzk=; b=Vvtn5SCw5km1Y/DI+cd9ZyH9TJxkpN6M5X9aDZvffENJ0iTknzJr4lEz85Yhf8 WDtJeW6Lf89uClkXlu1NQCKFYcT8LgKHqIJltjIAzhLsF/1llThghCfmSQDNQ7nS 1CATvS5TBvu4CKg65vgURoEdKrDmy6jr5dWSbtz6fsSvg= 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:Received:Received:Received:Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=MVbH41h85+v3z1nnbVL5jRvVPxyjJMRTEg2+g1SCT7YV9m+F0AbJfRDXYpEGUC nqP/6w+vIGtpSMIsy1V4M2TrDxbeqh771oJ2PPth5Bl0U/egjOYpEL4HdO3VPx6J a9ZvxE7uDNPMAop19nkJ3rUjtLVthc21s0Scfgl5CG854=; Received: (qmail 25499 invoked by alias); 22 Nov 2012 14:39:25 -0000 Received: (qmail 25306 invoked by uid 22791); 22 Nov 2012 14:39:23 -0000 X-SWARE-Spam-Status: No, hits=-4.2 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-ie0-f175.google.com (HELO mail-ie0-f175.google.com) (209.85.223.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Nov 2012 14:39:16 +0000 Received: by mail-ie0-f175.google.com with SMTP id qd14so6797443ieb.20 for ; Thu, 22 Nov 2012 06:39:16 -0800 (PST) Received: by 10.50.151.172 with SMTP id ur12mr763712igb.44.1353595156084; Thu, 22 Nov 2012 06:39:16 -0800 (PST) Received: from gnu-tools-1.localdomain (76-220-57-190.lightspeed.sntcca.sbcglobal.net. [76.220.57.190]) by mx.google.com with ESMTPS id ff4sm2132376igc.13.2012.11.22.06.39.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 06:39:13 -0800 (PST) Received: by gnu-tools-1.localdomain (Postfix, from userid 1000) id 268D81A1224; Thu, 22 Nov 2012 06:39:11 -0800 (PST) Date: Thu, 22 Nov 2012 06:39:11 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: [asan] PATCH: PR driver/55379: Issue an error for -static with fsanitize=address Message-ID: <20121122143910.GA23803@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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, fsanitize=address doesn't work with static link. This patch issues an error when both are specified. OK to install? Thanks. H.J. --- 2012-11-22 H.J. Lu PR driver/55379 * gcc.c (LINK_COMMAND_SPEC): Issue an error for -static with -fsanitize=address. diff --git a/gcc/gcc.c b/gcc/gcc.c index 0f8bcea..41474aa 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -696,7 +696,7 @@ proper position among the other output files. */ %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ %(mflib) " STACK_SPLIT_SPEC "\ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ - %{fsanitize=address:" LIBASAN_SPEC "}\ + %{fsanitize=address:" LIBASAN_SPEC "%{static:%ecannot specify -static with -fsanitize=address}}\ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}" #endif