[PATCH][RFH] Add dg-requires-linker-plugin support

Richard Guenther richard.guenther@gmail.com
Wed Jul 21 18:49:00 GMT 2010


On Thu, Jul 15, 2010 at 3:38 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> This adds a check for working linker-plugin support to the testsuite.
> It's includes a hack
> to add a -B to find the lto plugin in a built tree (Janis, is there
> some variable available
> that specifies the root of the build tree?  For installed testing not
> specifying the -B should
> be ok).  Should/can the dg-require-linker-plugin automatically add to
> ld-additional-options
> (still allowing that to append others?).
>
> Thus, not "ok?", but - any help here?
>
> It works in a built tree with linker plugin support and it properly
> makes the test
> unsupported if I mess up the -B argument (thus it should also work in a tree
> w/o linker plugin support).

Another way would be to copy lto-plugin.so to gcc/, similar to how we
do for libgcc_s.so.  But I am quite lost on how to do that with the current
lto-plugin makefiles (not to mention the dependency issue if we want to
make use of this during LTO bootstrap as well).

Ralf - do you have an idea where to hook the copying with automake?

Thanks,
Richard.

> Thanks,
> Richard.
>
> 2010-07-15  Richard Guenther  <rguenther@suse.de>
>
>        * lib/lto.exp (lto-link-and-maybe-run): Append path to find
>        the linker plugin.
>        * lib/target-supports-dg.exp (dg-require-linker-plugin): New proc.
>        * lib/target-supports.exp (check_linker_plugin_available): Likewise.
>
>        * gcc.dg/lto/20100715-1_0.c: New testcase.
>        * gcc.dg/lto/20100715-1_1.c: Likewise.
>



More information about the Gcc-patches mailing list