Bug 12402 - ld --disable-plugins configure options doesn't work
Summary: ld --disable-plugins configure options doesn't work
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-16 03:40 UTC by John David Anglin
Modified: 2011-02-01 15:07 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2011-01-16 03:40:09 UTC
I was unable to disable ld plugin support on hppa-unknown-linux-gnu.
GCC lto/plugin support is currently broken on this target.

It seems the stuff in config/plugins.m4 is overridden by the dlopen
stuff in configure.in:

# Check for dlopen support and enable plugins if possible.
enable_plugins=yes
AC_CHECK_HEADER([dlfcn.h],[],[enable_plugins=no],[AC_INCLUDES_DEFAULT])
AC_SEARCH_LIBS([dlopen],[dl],[],[enable_plugins=no],[])
AC_CHECK_FUNCS([dlopen dlsym dlclose],[],[enable_plugins=no])
# We also support plugins on Windows (MinGW).
if test x$enable_plugins = xno ; then
  AC_CHECK_HEADERS([Windows.h],[enable_plugins=yes],[],[AC_INCLUDES_DEFAULT])
fi
AM_CONDITIONAL([ENABLE_PLUGINS], [test x$enable_plugins = xyes])
Comment 1 Dave Korn 2011-02-01 03:56:13 UTC
(In reply to comment #0)
> I was unable to disable ld plugin support on hppa-unknown-linux-gnu.

  The --enable/--disable-plugins option is part of binutils/configure and decides only whether nm and ar have plugin support.  There is no way to disable ld plugin support (plugins.m4 is not even included by ld/configure.in; the code you quoted is more of a replacement than an override).

  This is by design - or to be precise, by review; I originally submitted a patch that did have configure-time control over whether the plugin interface was supported, but during the code review on the mailing list, I was persuaded to make it unconditional.  (I can't remember exactly why we decided that, but it's all there in the archives.) 

> GCC lto/plugin support is currently broken on this target.

  Is there else anything apart from GCC PR47274, which I'm looking at?
Comment 2 dave@hiauly1.hia.nrc.ca 2011-02-01 04:30:04 UTC
> > GCC lto/plugin support is currently broken on this target.
> 
>   Is there else anything apart from GCC PR47274, which I'm looking at?

There's about three hundred GCC lto/plugin fails.  There's a couple
of PRs.  It's hard to tell whether they are all the same bug or not.

Dave
Comment 3 Dave Korn 2011-02-01 07:03:21 UTC
(In reply to comment #2)
> > > GCC lto/plugin support is currently broken on this target.
> > 
> >   Is there else anything apart from GCC PR47274, which I'm looking at?
> 
> There's about three hundred GCC lto/plugin fails.  There's a couple
> of PRs.

Can you quote the PR numbers please?  I couldn't figure out which ones you meant from a quick bit of searching.
Comment 4 dave@hiauly1.hia.nrc.ca 2011-02-01 15:07:35 UTC
> > >   Is there else anything apart from GCC PR47274, which I'm looking at?
> > 
> > There's about three hundred GCC lto/plugin fails.  There's a couple
> > of PRs.
> 
> Can you quote the PR numbers please?  I couldn't figure out which ones you
> meant from a quick bit of searching.

The other one is GCC PR47827.

Dave