This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Skip ld/lto tests if plugins is disabled for binutils?


On Mon, Aug 11, 2014 at 04:21:55PM +0800, Bin.Cheng wrote:
> On Mon, Aug 11, 2014 at 3:55 PM, Alan Modra <amodra@gmail.com> wrote:
> > On Mon, Aug 11, 2014 at 02:26:19PM +0800, Bin.Cheng wrote:
> >> Hi,
> >> I found there are some FAIL ld test cases with message like "sorry -
> >> this program has been built without plugin support", and the program
> >> in this case is ar.  I think it's because I configured/built binutils
> >> without "--enable-plugins", the question is:
> >> should we skip these kind of tests if plugins isn't enabled?
> >
> > Actually the real question is why are we enabling plugins for ld
> > but not ar?
> 
> Thanks Alan, is it possible for binutils to have different plugin
> enabling for sub-programs?

In ld/configure.ac we have:

# 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])

So ld plugin support is always enabled, even when you configure with
--disable-plugins.  That seems wrong to me.

-- 
Alan Modra
Australia Development Lab, IBM


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