This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Enable linker plugin for windows [was Re: Discussion about merging Go frontend]
- From: Ian Lance Taylor <iant at google dot com>
- To: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 05 Nov 2010 14:35:25 -0700
- Subject: Re: [PATCH] Enable linker plugin for windows [was Re: Discussion about merging Go frontend]
- References: <mcr7hh8qhb5.fsf@google.com> <4CC45302.9000702@gmail.com> <mcrhbgbyoef.fsf@google.com> <4CC59F1E.7040505@codesourcery.com> <mcrbp6ixhny.fsf@google.com> <AANLkTikEy7ER+CkQdWo0XHPoBORvbp8JZ226QFM68PZv@mail.gmail.com> <87pquy3yh5.fsf@basil.nowhere.org> <4CC60C5E.6050605@gmail.com> <mcr1v79bx8q.fsf@google.com> <4CCBF722.5070507@gmail.com> <4CCC4C92.9060405@gmail.com>
Dave Korn <dave.korn.cygwin@gmail.com> 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:%<fcompare-debug*} %{fwhopr*:%<fcompare-debug*} \
> %{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?
Ian