]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ld -plugin options when plugins are disabled
authorAlan Modra <amodra@gmail.com>
Sat, 6 Jun 2020 01:58:08 +0000 (11:28 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 6 Jun 2020 01:58:08 +0000 (11:28 +0930)
commit070558eb0deed3fc798c41ec75db75f99660a4e1
tree6df538d3d8258fe7d178ede7962f9c6ae8461d57
parent62b5b3d836853730d40c5cc89015f831baf3131c
ld -plugin options when plugins are disabled

This patch makes ld accept and ignore -plugin options when configured
with --disable-plugins.  The idea is to allow using a linker built
without plugin support with a gcc built with plugin support.  Quite
obviously such a combination won't work if using LTO, but gcc has a
habit of passing a bunch of -plugin and -plugin-opt arguments to ld
even when not generating or linking LTO objects.

Why do I want to do this?  Well, it lets me and other binutils
developers answer the question as to whether plugin support breaks
binutils in some areas.  Which it does for some targets.

* lexsup.c (ld_options): Accept -plugin and -plugin-opt when
!ENABLE_PLUGINS.
* testsuite/lib/ld-lib.exp (check_plugin_api_available): Adjust.
ld/ChangeLog
ld/lexsup.c
ld/testsuite/lib/ld-lib.exp