This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Enable linker plugin for windows [was Re: Discussion about merging Go frontend]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]