From patchwork Tue Jun 15 19:19:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 55782 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 AA7D0B7DA5 for ; Wed, 16 Jun 2010 05:20:06 +1000 (EST) Received: (qmail 31035 invoked by alias); 15 Jun 2010 19:20:02 -0000 Received: (qmail 31004 invoked by uid 22791); 15 Jun 2010 19:20:01 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Jun 2010 19:19:56 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5FJJsfU003252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Jun 2010 15:19:54 -0400 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5FJJrS3009485 for ; Tue, 15 Jun 2010 15:19:53 -0400 Message-ID: <4C17D258.3070302@redhat.com> Date: Tue, 15 Jun 2010 15:19:52 -0400 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100603 Lightning/1.0b1 Shredder/3.0.6pre MIME-Version: 1.0 To: gcc-patches List Subject: RFA: PATCH to invoke lto-wrapper with -v if -debug was passed to collect2 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 I couldn't figure out any flag to give GCC to make it run lto-wrapper with -v, so I hacked up collect2 a bit: with this patch, gcc -Wl,-debug will end up calling lto-wrapper -v. OK for trunk? commit 5f1e09f7fc9572c77ebdfa31eb187683eaf15d74 Author: Jason Merrill Date: Mon Jun 14 01:42:16 2010 -0400 * collect2.c (maybe_run_lto_and_relink): If -debug, pass -v down. diff --git a/gcc/collect2.c b/gcc/collect2.c index 42db3cb..1931ea7 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -962,6 +962,9 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst, *lto_c_ptr++ = lto_wrapper; + if (debug) + *lto_c_ptr++ = "-v"; + /* Add LTO objects to the wrapper command line. */ for (list = lto_objects.first; list; list = list->next) *lto_c_ptr++ = list->name;