From patchwork Sun Oct 10 07:27:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 67337 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 68F5CB70AE for ; Sun, 10 Oct 2010 18:27:41 +1100 (EST) Received: (qmail 2581 invoked by alias); 10 Oct 2010 07:27:38 -0000 Received: (qmail 2573 invoked by uid 22791); 10 Oct 2010 07:27:37 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 10 Oct 2010 07:27:33 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 10 Oct 2010 00:27:32 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by orsmga002.jf.intel.com with ESMTP; 10 Oct 2010 00:27:32 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id CDCCE207F1; Sun, 10 Oct 2010 00:27:31 -0700 (PDT) Date: Sun, 10 Oct 2010 00:27:31 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: PATCH: PR bootstrap/45958: --with-build-config=bootstrap-lto doesn't work Message-ID: <20101010072731.GA19886@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) 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 --with-demangler-in-ld will make gcc to pass "--demangle -plugin ..." to ld. But exec-tool.in has collect-ld) # when using a linker plugin, gcc will always pass '-plugin' as the # first option to the linker. if test x"$1" = "x-plugin"; then original=$ORIGINAL_PLUGIN_LD_FOR_TARGET else original=$ORIGINAL_LD_FOR_TARGET fi It doesn't work with "--demangle -plugin ...". This patch supports '-plugin' as the second option to the linker. OK to install? Thanks. H.J. --- 2010-10-10 H.J. Lu PR bootstrap/45958 * exec-tool.in: Support '-plugin' as the second option to the linker. diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in index a146899..020294e 100644 --- a/gcc/exec-tool.in +++ b/gcc/exec-tool.in @@ -36,8 +36,8 @@ case "$invoked" in ;; collect-ld) # when using a linker plugin, gcc will always pass '-plugin' as the - # first option to the linker. - if test x"$1" = "x-plugin"; then + # first or second option to the linker. + if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then original=$ORIGINAL_PLUGIN_LD_FOR_TARGET else original=$ORIGINAL_LD_FOR_TARGET