From patchwork Wed Nov 14 11:11:26 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: 198874 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 E395F2C009F for ; Wed, 14 Nov 2012 22:11:39 +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=1353496300; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References: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=xrKGB3V3B1dISLgoxh8gcJZF4Zs=; b=k5ne3/ROSMEpCHAcljG2cH1YRHuDRSwUgDaDvx2bTFEyWnTdEWhypNG2/mhZfA DWuAUZf5SeKSuYh8J796fOYTADbLBlv3GbFQaHm5pdLRba6YFyYMZlErYL6lr7bu MAGm0UmN+SXwCp26PsmDWn7Bg6WO+/IJFwS3Ip2XgiaUk= 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:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=I8kp7xo3KZNe42gM17AcbbgS0Dx8pTDxuv+1OLQAFWr2D1ewvHRzuyVP8acRsw swnRjcjXrD2EtefKlA4ARcYTsBgn3yLn7+om7wJK8lPSTh1wZ0LunM00VY5IUyR7 dKxhTJJTJ5IU+uBURNQtYxEvdSo/3d7KJrLtjnX3xsE/Y=; Received: (qmail 14497 invoked by alias); 14 Nov 2012 11:11:34 -0000 Received: (qmail 14415 invoked by uid 22791); 14 Nov 2012 11:11:33 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_IB X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Nov 2012 11:11:27 +0000 Received: by mail-pb0-f47.google.com with SMTP id ro12so282365pbb.20 for ; Wed, 14 Nov 2012 03:11:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.213.33 with SMTP id np1mr76696466pbc.64.1352891486660; Wed, 14 Nov 2012 03:11:26 -0800 (PST) Received: by 10.68.19.138 with HTTP; Wed, 14 Nov 2012 03:11:26 -0800 (PST) In-Reply-To: References: <1351799566-31447-1-git-send-email-dodji@redhat.com> <87pq3v8vmi.fsf@redhat.com> <87fw4r7g8w.fsf_-_@redhat.com> <50994BAE.2060803@google.com> <878va73uwz.fsf@redhat.com> Date: Wed, 14 Nov 2012 03:11:26 -0800 Message-ID: Subject: Re: [PATCH 10/10] Import the asan runtime library into GCC tree From: "H.J. Lu" To: Dodji Seketeli Cc: Diego Novillo , gcc-patches@gcc.gnu.org, jakub@redhat.com, wmi@google.com, davidxl@google.com, konstantin.s.serebryany@gmail.com, Tobias Burnus 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 On Mon, Nov 12, 2012 at 10:59 AM, H.J. Lu wrote: > On Mon, Nov 12, 2012 at 3:47 AM, Dodji Seketeli wrote: >> Diego Novillo writes: >> >>> On 2012-11-02 16:10 , Dodji Seketeli wrote: >>> >>>> * configure.ac: Add libsanitizer to target_libraries. >>>> * Makefile.def: Ditto. >>>> * configure: Regenerate. >>>> * Makefile.in: Regenerate. >>>> * libsanitizer: New directory for asan runtime. Contains an empty >>>> tsan directory. >>>> >>>> gcc: >>>> * gcc.c (LINK_COMMAND_SPEC): Add -lasan to link command >>>> if -faddress-sanitizer is on. >>> >>> OK with Jakub's comments addressed. >>> >>> References to -fasan in diagnostics should be replaced. But there's >>> been another flag name change upstream, so let's do it together with >>> the new flag names. >> >> Done. This also addresses the comment later made by Tobias below: >> >> Tobias Burnus writes: >> >>> Other issues: >> >>> * Probably fixed on the branch: gcc/gcc.c still has "fasan" instead of >>> "faddress-sanitizer" for the spec: >>> + %{fasan:-lasan} >> >> Below is a link to the updated patch. >> >> This patch imports the runtime library in the GCC tree, ensures that >> -lasan is passed to the linker when -faddress-sanitizer is used and >> sets up the build system accordingly. >> >> * configure.ac: Add libsanitizer to target_libraries. >> * Makefile.def: Ditto. >> * configure: Regenerate. >> * Makefile.in: Regenerate. >> * libsanitizer: New directory for asan runtime. Contains an empty >> tsan directory. >> >> gcc: >> * gcc.c (LINK_COMMAND_SPEC): Add -laddress-sanitizer to link command >> if -faddress-sanitizer is on. >> >> libsanitizer: >> >> Initial checkin: migrate asan runtime from llvm. >> >> http://people.redhat.com/~dseketel/gcc/patches/0011-Import-the-asan-runtime-library-into-GCC-tree.patch >> >> -- >> Dodji > > I checked in this patch to add libsanitizer generated files. > > -- > H.J. > --- > diff --git a/contrib/ChangeLog b/contrib/ChangeLog > index ef5d6f6..233870d 100644 > --- a/contrib/ChangeLog > +++ b/contrib/ChangeLog > @@ -1,3 +1,7 @@ > +2012-11-12 H.J. Lu > + > + * gcc_update: Add libsanitizer generated files. > + > 2012-11-05 Lawrence Crowl > > * compare_two_ftime_report_sets: New. > diff --git a/contrib/gcc_update b/contrib/gcc_update > index 02897ab..d9c2dfb 100755 > --- a/contrib/gcc_update > +++ b/contrib/gcc_update > @@ -149,6 +149,9 @@ libatomic/Makefile.in: libatomic/Makefile.am > libatomic/aclocal.m4 > libatomic/testsuite/Makefile.in: libatomic/testsuite/Makefile.am > libatomic/aclocal.m4 > libatomic/configure: libatomic/configure.ac libatomic/aclocal.m4 > libatomic/auto-config.h.in: libatomic/configure.ac libatomic/aclocal.m4 > +libsanitizer/aclocal.m4: libsanitizer/configure.ac > +libsanitizer/Makefile.in: libsanitizer/Makefile.am libsanitizer/aclocal.m4 > +libsanitizer/configure: libsanitizer/configure.ac libsanitizer/aclocal.m4 > # Top level > Makefile.in: Makefile.tpl Makefile.def > configure: configure.ac config/acx.m4 I checked in this to update libsanitizer generated files. Index: ChangeLog =================================================================== --- ChangeLog (revision 193496) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2012-11-14 H.J. Lu + + * gcc_update: Update libsanitizer generated files. + 2012-11-12 Tobias Burnus * gcc_update: Add libquadmath generated files. Index: gcc_update =================================================================== --- gcc_update (revision 193496) +++ gcc_update (working copy) @@ -152,9 +152,12 @@ libatomic/testsuite/Makefile.in: libatomic/testsuite/Makefile.am libatomic/aclocal.m4 libatomic/configure: libatomic/configure.ac libatomic/aclocal.m4 libatomic/auto-config.h.in: libatomic/configure.ac libatomic/aclocal.m4 -libsanitizer/aclocal.m4: libsanitizer/configure.ac +libsanitizer/aclocal.m4: libsanitizer/configure.ac libsanitizer/acinclude.m4 libsanitizer/Makefile.in: libsanitizer/Makefile.am libsanitizer/aclocal.m4 libsanitizer/configure: libsanitizer/configure.ac libsanitizer/aclocal.m4 +libsanitizer/asan/Makefile.in: libsanitizer/asan/Makefile.am libsanitizer/aclocal.m4 +libsanitizer/interception/Makefile.in: libsanitizer/interception/Makefile.am libsanitizer/aclocal.m4 +libsanitizer/sanitizer_common/Makefile.in: