From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28673 invoked by alias); 5 Nov 2010 22:02:51 -0000 Received: (qmail 28624 invoked by uid 22791); 5 Nov 2010 22:02:50 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-ww0-f41.google.com (HELO mail-ww0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Nov 2010 22:02:45 +0000 Received: by wwi18 with SMTP id 18so267834wwi.2 for ; Fri, 05 Nov 2010 15:02:43 -0700 (PDT) Received: by 10.216.235.41 with SMTP id t41mr1693993weq.55.1288994562730; Fri, 05 Nov 2010 15:02:42 -0700 (PDT) Received: from [192.168.2.99] (cpc2-cmbg8-0-0-cust61.5-4.cable.virginmedia.com [82.6.108.62]) by mx.google.com with ESMTPS id w8sm1206527wei.21.2010.11.05.15.02.37 (version=SSLv3 cipher=RC4-MD5); Fri, 05 Nov 2010 15:02:37 -0700 (PDT) Message-ID: <4CD48488.6060003@gmail.com> Date: Fri, 05 Nov 2010 22:03:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Ian Lance Taylor CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Enable linker plugin for windows [was Re: Discussion about merging Go frontend] References: <4CC45302.9000702@gmail.com> <4CC59F1E.7040505@codesourcery.com> <87pquy3yh5.fsf@basil.nowhere.org> <4CC60C5E.6050605@gmail.com> <4CCBF722.5070507@gmail.com> <4CCC4C92.9060405@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-11/txt/msg00591.txt.bz2 On 05/11/2010 21:35, Ian Lance Taylor wrote: > Dave Korn writes: > >> gcc/ChangeLog: >> >> * gcc.c (PLUGIN_PASSTHROUGH_SPEC): New macro factored out from >> LINK_COMMAND_SPEC. >> (LINK_COMMAND_SPEC): Use it. >> (static_spec_functions[]): Add pass-through-libs entry. >> (pass_through_libs_spec_func): Add related spec function. >> * config/i386/cygming.h (PLUGIN_PASSTHROUGH_SPEC): Define. >> * doc/tm.texi.in (PLUGIN_PASSTHROUGH_SPEC): Document. >> (LINK_COMMAND_SPEC): Mention it. >> * doc/tm.texi: Regenerate. >> * doc/invoke.texi (pass-through-libs): Mention new spec function. > >> @@ -658,10 +667,8 @@ >> %{fuse-linker-plugin: \ >> -plugin %(linker_plugin_file) \ >> -plugin-opt=%(lto_wrapper) \ >> - -plugin-opt=-fresolution=%u.res \ >> - %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} \ >> - %{static:-plugin-opt=-pass-through=-lc} \ >> - } \ >> + -plugin-opt=-fresolution=%u.res " \ >> + PLUGIN_PASSTHROUGH_SPEC " } \ >> %{flto:%> %{flto} %{fwhopr*} %l " LINK_PIE_SPEC \ >> "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\ > > Any reason not to make PLUGIN_PASSTHROUGH_SPEC into a proper spec, > invoked by %(plugin_passthrough) rather than by preprocessor string > concatenation? Well, "I didn't think of it" is the main reason :) I don't suppose there's going to be any call to change or override it on any kind of regular basis, I very much expect we'll have the default one for ELF targets and an override for COFF targets and that's all that will ever be needed. So I didn't think it ever likely to need a name of its own to refer to it by. If you can see some advantage to making it a real spec, feel free to file an enhancement PR against my name. cheers, DaveK