Plugin tests in ld testsuite

Alan Modra amodra@gmail.com
Sun Jun 21 07:43:24 GMT 2020


On Sat, Jun 20, 2020 at 03:59:16PM -0700, Stephen Casner wrote:
> On Tue, 16 Jun 2020, Alan Modra wrote:
> > I think you would be pioneering AOUT plugin support if you chose to
> > support plugins on pdp11.  How much of a challenge do you enjoy?  :-)
> 
> My immediate goal is to avoid the unexpected failures for ld plugin
> tests on the pdp11-aout target.  Probably the simplest fix would be to
> add a check near the top of ld/plugin.exp for pdp11-*-aout or *-*-aout
> to skip the tests.  However, it seems somewhat disingenuous for ld to
> accept a -plugin option for the aout targets if the functionality is
> broken, and removing it would allow the existing checks in plugin.exp
> to skip the tests.
> 
> I don't know what range of functionality can be provided by plugins.
> Are there some uses other than claiming files and defining symbols
> that may be functional for aout targets?

gcc's link time optimization is the major reason we have plugins.

> If removing the -plugin option is the right course of action, I'm not
> sure how that should be done.  I've looked at the configuration files
> but I did not find any example of a target for which plugins are
> disabled.  It's also not clear where it would be reasonable to insert
> a target-specific check.  config/plugins.m4? config/largefile.m4?
> Create a new variable to be set in ld/configure.tgt and checked in one
> of the m4 files?
> 
> Also, the disabling could be by just changing the default for the aout
> targets to be --disable-plugins or it could be to remove the
> configuration option completely if it does not make sense to allow
> building with --enable-plugins.
> 
> Alan, I noticed PR 26132 that you reported regarding problems in ar
> for some targets with plugins enabled.  I was hoping to see whether
> the fix for that PR might show the direction for my questions above.

I'm aiming to fix that PR by firstly making all files in ld/ that
currently test ENABLE_PLUGINS instead test BFD_SUPPORTS_PLUGINS.  That
will allow just one configure file to control the default for whether
plugins are enabled.  I think it would be reasonable for some targets
like pdp11 and alpha-vms to have plugins disabled by default, with
users getting a warning if they override the default with
--enable-plugins.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list