Do without ld ENABLE_PLUGINS
authorAlan Modra <amodra@gmail.com>
Sun, 21 Jun 2020 04:53:46 +0000 (14:23 +0930)
committerAlan Modra <amodra@gmail.com>
Sun, 21 Jun 2020 12:46:10 +0000 (22:16 +0930)
Instead, use BFD_SUPPORTS_PLUGINS.

* ldfile.c: Replace uses of ENABLE_PLUGINS with BFD_SUPPORTS_PLUGINS.
* ldlang.c: Likewise.
* ldlang.h: Likewise.
* ldlex.h: Likewise.
* ldmain.c: Likewise.
* lexsup.c: Likewise.
* plugin.c: Wrap body of file in #if BFD_SUPPORTS_PLUGINS.
* testplug.c: Likewise.
* testplug2.c: Likewise.
* testplug3.c: Likewise.
* testplug4.c: Likewise.
* configure.ac (ENABLE_PLUGINS): Don't define AM_CONTITIONAL.
* Makefile.am: Remove ENABLE_PLUGINS conditionals.
(PLUGIN_CFLAGS): Don't define.
(PLUGIN_C, PLUGIN_H, PLUGIN_OBJECT): Likewise.  Substitute all
uses with plugin file name.
* configure: Regenerate.
* Makefile.in: Regenerate.

16 files changed:
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure
ld/configure.ac
ld/ldfile.c
ld/ldlang.c
ld/ldlang.h
ld/ldlex.h
ld/ldmain.c
ld/lexsup.c
ld/plugin.c
ld/testplug.c
ld/testplug2.c
ld/testplug3.c
ld/testplug4.c

index b089073dacd01bae5493dd3d66b9af514ac57a60..5d460cfefa0951476456b340f9ca4b3dfc38c09b 100644 (file)
@@ -1,3 +1,24 @@
+2020-06-21  Alan Modra  <amodra@gmail.com>
+
+       * ldfile.c: Replace uses of ENABLE_PLUGINS with BFD_SUPPORTS_PLUGINS.
+       * ldlang.c: Likewise.
+       * ldlang.h: Likewise.
+       * ldlex.h: Likewise.
+       * ldmain.c: Likewise.
+       * lexsup.c: Likewise.
+       * plugin.c: Wrap body of file in #if BFD_SUPPORTS_PLUGINS.
+       * testplug.c: Likewise.
+       * testplug2.c: Likewise.
+       * testplug3.c: Likewise.
+       * testplug4.c: Likewise.
+       * configure.ac (ENABLE_PLUGINS): Don't define AM_CONTITIONAL.
+       * Makefile.am: Remove ENABLE_PLUGINS conditionals.
+       (PLUGIN_CFLAGS): Don't define.
+       (PLUGIN_C, PLUGIN_H, PLUGIN_OBJECT): Likewise.  Substitute all
+       uses with plugin file name.
+       * configure: Regenerate.
+       * Makefile.in: Regenerate.
+
 2020-06-20  Alan Modra  <amodra@gmail.com>
 
        * testsuite/lib/ld-lib.exp (default_ld_compile): Don't perror on
index ffff427bfbf6c18d53fec06b62c77dee35e70453..f0767f2be3dac8f62cf380d5b3242731325fef62 100644 (file)
@@ -47,19 +47,6 @@ WARN_CFLAGS = @WARN_CFLAGS@
 NO_WERROR = @NO_WERROR@
 AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
 
-# Conditionally enable the plugin interface.
-if ENABLE_PLUGINS
-PLUGIN_C = plugin.c
-PLUGIN_H = plugin.h
-PLUGIN_OBJECT = plugin.@OBJEXT@
-PLUGIN_CFLAGS = -DENABLE_PLUGINS
-else
-PLUGIN_C =
-PLUGIN_H =
-PLUGIN_OBJECT =
-PLUGIN_CFLAGS =
-endif
-
 # We put the scripts in the directory $(scriptdir)/ldscripts.
 # We can't put the scripts in $(datadir) because the SEARCH_DIR
 # directives need to be different for native and cross linkers.
@@ -152,7 +139,7 @@ TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
                    -I $(top_srcdir)/../libiberty
 
 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @zlibinc@ \
-       @INCINTL@ $(HDEFINES) $(CFLAGS) $(PLUGIN_CFLAGS) \
+       @INCINTL@ $(HDEFINES) $(CFLAGS) \
        -DLOCALEDIR="\"$(datadir)/locale\""
 
 BFDLIB = ../bfd/libbfd.la
@@ -482,12 +469,12 @@ ALL_64_EMUL_EXTRA_OFILES = \
 CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
        ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
        mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \
-       $(PLUGIN_C) ldbuildid.c ldelf.c ldelfgen.c
+       plugin.c ldbuildid.c ldelf.c ldelfgen.c
 
 HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
        ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
        ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h \
-       elf-hints-local.h $(PLUGIN_H) ldbuildid.h ldelf.h ldelfgen.h
+       elf-hints-local.h plugin.h ldbuildid.h ldelf.h ldelfgen.h
 
 GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
 GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
@@ -497,7 +484,7 @@ GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
 BUILT_SOURCES = $(GENERATED_HFILES)
 
 OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@ \
-       mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ $(PLUGIN_OBJECT) \
+       mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ plugin.@OBJEXT@ \
        ldwrite.@OBJEXT@ ldexp.@OBJEXT@  ldemul.@OBJEXT@ ldver.@OBJEXT@ ldmisc.@OBJEXT@ \
        ldfile.@OBJEXT@ ldcref.@OBJEXT@ ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES} \
        ldbuildid.@OBJEXT@
@@ -959,7 +946,7 @@ EXTRA_ld_new_SOURCES = deffilep.y ldlex.l
 EXTRA_ld_new_SOURCES += pep-dll.c pe-dll.c ldelf.c ldelfgen.c
 
 ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
-       ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c $(PLUGIN_C) \
+       ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c \
        ldbuildid.c
 ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \
                      $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL_DEP)
@@ -997,7 +984,6 @@ development.exp: $(BFDDIR)/development.sh
 #
 # Build a dummy plugin using libtool.
 #
-if ENABLE_PLUGINS
 noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
                     libldtestplug3.la libldtestplug4.la
 libldtestplug_la_SOURCES = testplug.c
@@ -1012,7 +998,6 @@ libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
 libldtestplug4_la_SOURCES = testplug4.c
 libldtestplug4_la_CFLAGS= -g -O2
 libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
-endif
 
 # DOCUMENTATION TARGETS
 # Manual configuration file; not usually attached to normal configuration,
index 99b66589d4678cc029ac0523b076b1d233ece1ae..be0291ceecdf4bc163a836ceb7cadd4e5a31d690 100644 (file)
@@ -138,8 +138,7 @@ CONFIG_CLEAN_FILES = po/Makefile.in
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libldtestplug_la_LIBADD =
-@ENABLE_PLUGINS_TRUE@am_libldtestplug_la_OBJECTS =  \
-@ENABLE_PLUGINS_TRUE@  libldtestplug_la-testplug.lo
+am_libldtestplug_la_OBJECTS = libldtestplug_la-testplug.lo
 libldtestplug_la_OBJECTS = $(am_libldtestplug_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -149,44 +148,36 @@ libldtestplug_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(libldtestplug_la_CFLAGS) $(CFLAGS) \
        $(libldtestplug_la_LDFLAGS) $(LDFLAGS) -o $@
-@ENABLE_PLUGINS_TRUE@am_libldtestplug_la_rpath =
 libldtestplug2_la_LIBADD =
-@ENABLE_PLUGINS_TRUE@am_libldtestplug2_la_OBJECTS =  \
-@ENABLE_PLUGINS_TRUE@  libldtestplug2_la-testplug2.lo
+am_libldtestplug2_la_OBJECTS = libldtestplug2_la-testplug2.lo
 libldtestplug2_la_OBJECTS = $(am_libldtestplug2_la_OBJECTS)
 libldtestplug2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(libldtestplug2_la_CFLAGS) $(CFLAGS) \
        $(libldtestplug2_la_LDFLAGS) $(LDFLAGS) -o $@
-@ENABLE_PLUGINS_TRUE@am_libldtestplug2_la_rpath =
 libldtestplug3_la_LIBADD =
-@ENABLE_PLUGINS_TRUE@am_libldtestplug3_la_OBJECTS =  \
-@ENABLE_PLUGINS_TRUE@  libldtestplug3_la-testplug3.lo
+am_libldtestplug3_la_OBJECTS = libldtestplug3_la-testplug3.lo
 libldtestplug3_la_OBJECTS = $(am_libldtestplug3_la_OBJECTS)
 libldtestplug3_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(libldtestplug3_la_CFLAGS) $(CFLAGS) \
        $(libldtestplug3_la_LDFLAGS) $(LDFLAGS) -o $@
-@ENABLE_PLUGINS_TRUE@am_libldtestplug3_la_rpath =
 libldtestplug4_la_LIBADD =
-@ENABLE_PLUGINS_TRUE@am_libldtestplug4_la_OBJECTS =  \
-@ENABLE_PLUGINS_TRUE@  libldtestplug4_la-testplug4.lo
+am_libldtestplug4_la_OBJECTS = libldtestplug4_la-testplug4.lo
 libldtestplug4_la_OBJECTS = $(am_libldtestplug4_la_OBJECTS)
 libldtestplug4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
        $(libldtestplug4_la_CFLAGS) $(CFLAGS) \
        $(libldtestplug4_la_LDFLAGS) $(LDFLAGS) -o $@
-@ENABLE_PLUGINS_TRUE@am_libldtestplug4_la_rpath =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
        "$(DESTDIR)$(man1dir)"
 PROGRAMS = $(bin_PROGRAMS)
-@ENABLE_PLUGINS_TRUE@am__objects_1 = plugin.$(OBJEXT)
 am_ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex-wrapper.$(OBJEXT) \
        lexsup.$(OBJEXT) ldlang.$(OBJEXT) mri.$(OBJEXT) \
        ldctor.$(OBJEXT) ldmain.$(OBJEXT) ldwrite.$(OBJEXT) \
        ldexp.$(OBJEXT) ldemul.$(OBJEXT) ldver.$(OBJEXT) \
        ldmisc.$(OBJEXT) ldfile.$(OBJEXT) ldcref.$(OBJEXT) \
-       $(am__objects_1) ldbuildid.$(OBJEXT)
+       plugin.$(OBJEXT) ldbuildid.$(OBJEXT)
 ld_new_OBJECTS = $(am_ld_new_OBJECTS)
 am__DEPENDENCIES_1 =
 AM_V_P = $(am__v_P_@AM_V@)
@@ -558,16 +549,6 @@ ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
           -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
 
 AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
-@ENABLE_PLUGINS_FALSE@PLUGIN_C = 
-
-# Conditionally enable the plugin interface.
-@ENABLE_PLUGINS_TRUE@PLUGIN_C = plugin.c
-@ENABLE_PLUGINS_FALSE@PLUGIN_H = 
-@ENABLE_PLUGINS_TRUE@PLUGIN_H = plugin.h
-@ENABLE_PLUGINS_FALSE@PLUGIN_OBJECT = 
-@ENABLE_PLUGINS_TRUE@PLUGIN_OBJECT = plugin.@OBJEXT@
-@ENABLE_PLUGINS_FALSE@PLUGIN_CFLAGS = 
-@ENABLE_PLUGINS_TRUE@PLUGIN_CFLAGS = -DENABLE_PLUGINS
 
 # We put the scripts in the directory $(scriptdir)/ldscripts.
 # We can't put the scripts in $(datadir) because the SEARCH_DIR
@@ -642,7 +623,7 @@ TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
                    -I $(top_srcdir)/../libiberty
 
 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @zlibinc@ \
-       @INCINTL@ $(HDEFINES) $(CFLAGS) $(PLUGIN_CFLAGS) \
+       @INCINTL@ $(HDEFINES) $(CFLAGS) \
        -DLOCALEDIR="\"$(datadir)/locale\""
 
 BFDLIB = ../bfd/libbfd.la
@@ -970,12 +951,12 @@ ALL_64_EMUL_EXTRA_OFILES = \
 CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
        ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
        mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \
-       $(PLUGIN_C) ldbuildid.c ldelf.c ldelfgen.c
+       plugin.c ldbuildid.c ldelf.c ldelfgen.c
 
 HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
        ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
        ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h \
-       elf-hints-local.h $(PLUGIN_H) ldbuildid.h ldelf.h ldelfgen.h
+       elf-hints-local.h plugin.h ldbuildid.h ldelf.h ldelfgen.h
 
 GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
 GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
@@ -984,7 +965,7 @@ GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
 # tracking will not cause them to be built beforehand.
 BUILT_SOURCES = $(GENERATED_HFILES)
 OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@ \
-       mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ $(PLUGIN_OBJECT) \
+       mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ plugin.@OBJEXT@ \
        ldwrite.@OBJEXT@ ldexp.@OBJEXT@  ldemul.@OBJEXT@ ldver.@OBJEXT@ ldmisc.@OBJEXT@ \
        ldfile.@OBJEXT@ ldcref.@OBJEXT@ ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES} \
        ldbuildid.@OBJEXT@
@@ -1005,7 +986,7 @@ EXTRA_ld_new_SOURCES = deffilep.y ldlex.l pep-dll.c pe-dll.c ldelf.c \
        ldelfgen.c $(ALL_EMULATION_SOURCES) \
        $(ALL_64_EMULATION_SOURCES)
 ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
-       ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c $(PLUGIN_C) \
+       ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c \
        ldbuildid.c
 
 ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \
@@ -1016,21 +997,21 @@ ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBCTF) $(LI
 #
 # Build a dummy plugin using libtool.
 #
-@ENABLE_PLUGINS_TRUE@noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
-@ENABLE_PLUGINS_TRUE@               libldtestplug3.la libldtestplug4.la
-
-@ENABLE_PLUGINS_TRUE@libldtestplug_la_SOURCES = testplug.c
-@ENABLE_PLUGINS_TRUE@libldtestplug_la_CFLAGS = -g -O2
-@ENABLE_PLUGINS_TRUE@libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere
-@ENABLE_PLUGINS_TRUE@libldtestplug2_la_SOURCES = testplug2.c
-@ENABLE_PLUGINS_TRUE@libldtestplug2_la_CFLAGS = -g -O2
-@ENABLE_PLUGINS_TRUE@libldtestplug2_la_LDFLAGS = -no-undefined -rpath /nowhere
-@ENABLE_PLUGINS_TRUE@libldtestplug3_la_SOURCES = testplug3.c
-@ENABLE_PLUGINS_TRUE@libldtestplug3_la_CFLAGS = -g -O2
-@ENABLE_PLUGINS_TRUE@libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
-@ENABLE_PLUGINS_TRUE@libldtestplug4_la_SOURCES = testplug4.c
-@ENABLE_PLUGINS_TRUE@libldtestplug4_la_CFLAGS = -g -O2
-@ENABLE_PLUGINS_TRUE@libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
+noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
+                    libldtestplug3.la libldtestplug4.la
+
+libldtestplug_la_SOURCES = testplug.c
+libldtestplug_la_CFLAGS = -g -O2
+libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere
+libldtestplug2_la_SOURCES = testplug2.c
+libldtestplug2_la_CFLAGS = -g -O2
+libldtestplug2_la_LDFLAGS = -no-undefined -rpath /nowhere
+libldtestplug3_la_SOURCES = testplug3.c
+libldtestplug3_la_CFLAGS = -g -O2
+libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
+libldtestplug4_la_SOURCES = testplug4.c
+libldtestplug4_la_CFLAGS = -g -O2
+libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
 MAINTAINERCLEANFILES = configdoc.texi ld.1 ld.info
 
 # We want to reconfigure if configure.host or configure.tgt changes.
@@ -1118,16 +1099,16 @@ clean-noinstLTLIBRARIES:
        }
 
 libldtestplug.la: $(libldtestplug_la_OBJECTS) $(libldtestplug_la_DEPENDENCIES) $(EXTRA_libldtestplug_la_DEPENDENCIES) 
-       $(AM_V_CCLD)$(libldtestplug_la_LINK) $(am_libldtestplug_la_rpath) $(libldtestplug_la_OBJECTS) $(libldtestplug_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(libldtestplug_la_LINK)  $(libldtestplug_la_OBJECTS) $(libldtestplug_la_LIBADD) $(LIBS)
 
 libldtestplug2.la: $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_DEPENDENCIES) $(EXTRA_libldtestplug2_la_DEPENDENCIES) 
-       $(AM_V_CCLD)$(libldtestplug2_la_LINK) $(am_libldtestplug2_la_rpath) $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(libldtestplug2_la_LINK)  $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_LIBADD) $(LIBS)
 
 libldtestplug3.la: $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_DEPENDENCIES) $(EXTRA_libldtestplug3_la_DEPENDENCIES) 
-       $(AM_V_CCLD)$(libldtestplug3_la_LINK) $(am_libldtestplug3_la_rpath) $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(libldtestplug3_la_LINK)  $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_LIBADD) $(LIBS)
 
 libldtestplug4.la: $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_DEPENDENCIES) $(EXTRA_libldtestplug4_la_DEPENDENCIES) 
-       $(AM_V_CCLD)$(libldtestplug4_la_LINK) $(am_libldtestplug4_la_rpath) $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(libldtestplug4_la_LINK)  $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_LIBADD) $(LIBS)
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
        @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
index e70e7c304b13c9e20fcf758c8e0a1aa9b87dd91b..fba65c58e222f98000bde8be57944de81f27f1e7 100755 (executable)
@@ -649,8 +649,6 @@ STRINGIFY
 zlibinc
 zlibdir
 enable_initfini_array
-ENABLE_PLUGINS_FALSE
-ENABLE_PLUGINS_TRUE
 NATIVE_LIB_DIRS
 HDEFINES
 do_compare
@@ -12035,7 +12033,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12038 "configure"
+#line 12036 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12141,7 +12139,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12144 "configure"
+#line 12142 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17285,14 +17283,6 @@ if test "$ac_res" != no; then :
 
 fi
 
- if test x$plugins = xyes; then
-  ENABLE_PLUGINS_TRUE=
-  ENABLE_PLUGINS_FALSE='#'
-else
-  ENABLE_PLUGINS_TRUE='#'
-  ENABLE_PLUGINS_FALSE=
-fi
-
 
 # Check whether --enable-initfini-array was given.
 if test "${enable_initfini_array+set}" = set; then :
@@ -17890,10 +17880,6 @@ if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then
   as_fn_error $? "conditional \"GENINSRC_NEVER\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${ENABLE_PLUGINS_TRUE}" && test -z "${ENABLE_PLUGINS_FALSE}"; then
-  as_fn_error $? "conditional \"ENABLE_PLUGINS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
index 99957df3763bd3e1587fe71070553873dce30b42..2b6c0480e90179024479c2aae22e35aee7ca23b1 100644 (file)
@@ -274,7 +274,6 @@ dnl AC_CHECK_HEADERS(sys/mman.h)
 AC_FUNC_MMAP
 
 AC_SEARCH_LIBS([dlopen], [dl])
-AM_CONDITIONAL([ENABLE_PLUGINS], [test x$plugins = xyes])
 
 AC_ARG_ENABLE(initfini-array,
 [  --disable-initfini-array do not use .init_array/.fini_array sections],
index 60b28d3f0ce84d7a6d13b9ea4ac861985a5a3cf2..f3de2c2356a21fc85e3d54c55357dd240ebd3bf0 100644 (file)
 #include "ldemul.h"
 #include "libiberty.h"
 #include "filenames.h"
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin-api.h"
 #include "plugin.h"
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
 bfd_boolean ldfile_assumed_script = FALSE;
 const char *ldfile_output_machine_name = "";
@@ -148,7 +148,7 @@ ldfile_try_open_bfd (const char *attempt,
   /* This is a linker input BFD.  */
   entry->the_bfd->is_linker_input = 1;
 
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   if (entry->flags.lto_output)
     entry->the_bfd->lto_output = 1;
 #endif
@@ -302,7 +302,7 @@ ldfile_try_open_bfd (const char *attempt,
        }
     }
  success:
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   /* If plugins are active, they get first chance to claim
      any successfully-opened input file.  We skip archives
      here; the plugin wants us to offer it the individual
@@ -316,7 +316,7 @@ ldfile_try_open_bfd (const char *attempt,
       && !no_more_claiming
       && bfd_check_format (entry->the_bfd, bfd_object))
     plugin_maybe_claim (entry);
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
   /* It opened OK, the format checked out, and the plugins have had
      their chance to claim it, so this is success.  */
index 14a6a577d224ecd32a5b1d00fb194d00f12f017f..8ab6a0b0c36f69660e544493d6ff4b454f0cfe43 100644 (file)
@@ -42,9 +42,9 @@
 #include "demangle.h"
 #include "hashtab.h"
 #include "elf-bfd.h"
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin.h"
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
 #ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) & (((TYPE*) 0)->MEMBER))
@@ -3526,7 +3526,7 @@ enum open_bfd_mode
     OPEN_BFD_FORCE = 1,
     OPEN_BFD_RESCAN = 2
   };
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
 static lang_input_statement_type *plugin_insert = NULL;
 static struct bfd_link_hash_entry *plugin_undefs = NULL;
 #endif
@@ -3556,7 +3556,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
        case lang_group_statement_enum:
          {
            struct bfd_link_hash_entry *undefs;
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
            lang_input_statement_type *plugin_insert_save;
 #endif
 
@@ -3566,7 +3566,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
 
            do
              {
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
                plugin_insert_save = plugin_insert;
 #endif
                undefs = link_info.hash->undefs_tail;
@@ -3574,7 +3574,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
                                 mode | OPEN_BFD_FORCE);
              }
            while (undefs != link_info.hash->undefs_tail
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
                   /* Objects inserted by a plugin, which are loaded
                      before we hit this loop, may have added new
                      undefs.  */
@@ -3601,7 +3601,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
                 has been loaded already.  Do the same for a rescan.
                 Likewise reload --as-needed shared libs.  */
              if (mode != OPEN_BFD_NORMAL
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
                  && ((mode & OPEN_BFD_RESCAN) == 0
                      || plugin_insert == NULL)
 #endif
@@ -3648,7 +3648,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
                    }
                }
            }
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
          /* If we have found the point at which a plugin added new
             files, clear plugin_insert to enable archive rescan.  */
          if (&s->input_statement == plugin_insert)
@@ -6899,11 +6899,11 @@ lang_check (void)
        file != NULL;
        file = file->next)
     {
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
       /* Don't check format of files claimed by plugin.  */
       if (file->flags.claimed)
        continue;
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
       input_bfd = file->the_bfd;
       compatible
        = bfd_arch_get_compatible (input_bfd, link_info.output_bfd,
@@ -7438,7 +7438,7 @@ lang_gc_sections (void)
       LANG_FOR_EACH_INPUT_STATEMENT (f)
        {
          asection *sec;
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
          if (f->flags.claimed)
            continue;
 #endif
@@ -7585,7 +7585,7 @@ lang_relax_sections (bfd_boolean need_layout)
     }
 }
 
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
 /* Find the insert point for the plugin's replacement files.  We
    place them after the first claimed real object file, or if the
    first claimed object is an archive member, after the last real
@@ -7728,7 +7728,7 @@ find_next_input_statement (lang_statement_union_type **s)
     }
   return s;
 }
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
 /* Add NAME to the list of garbage collection entry points.  */
 
@@ -7819,7 +7819,7 @@ lang_process (void)
      to symbolic origin/length now.  */
   lang_do_memory_regions ();
 
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   if (link_info.lto_plugin_active)
     {
       lang_statement_list_type added;
@@ -7922,7 +7922,7 @@ lang_process (void)
            }
        }
     }
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
   /* Make sure that nobody has tried to add a symbol to this list
      before now.  */
index 529ccd15859ec21a9cfcacb22efd9ed44e7a0d95..196debfa37e8ed15f2b1b67d57df05d8c9cf21f2 100644 (file)
@@ -271,7 +271,7 @@ struct lang_input_statement_flags
   /* Set if reloading an archive or --as-needed lib.  */
   unsigned int reload : 1;
 
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   /* Set if the file was claimed by a plugin.  */
   unsigned int claimed : 1;
 
@@ -280,7 +280,7 @@ struct lang_input_statement_flags
 
   /* Set if added by the lto plugin add_input_file callback.  */
   unsigned int lto_output : 1;
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
   /* Head of list of pushed flags.  */
   struct lang_input_statement_flags *pushed;
index 6388247b45299e76945461d014e8dce810ea66ed..7868dca3499016b00c10bd36b31c4230b5522aec 100644 (file)
@@ -135,10 +135,10 @@ enum option_values
   OPTION_WARN_TEXTREL,
   OPTION_WARN_ALTERNATE_EM,
   OPTION_REDUCE_MEMORY_OVERHEADS,
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   OPTION_PLUGIN,
   OPTION_PLUGIN_OPT,
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
   OPTION_DEFAULT_SCRIPT,
   OPTION_PRINT_OUTPUT_FORMAT,
   OPTION_PRINT_SYSROOT,
index b0ce69f11860b89c501fe1dc36f0e5e9b16281cb..d34d30ae3371a88e94abb5d9774a8325149daee9 100644 (file)
 #include "ldfile.h"
 #include "ldemul.h"
 #include "ldctor.h"
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin.h"
 #include "plugin-api.h"
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
 /* Somewhere above, sys/stat.h got included.  */
 #if !defined(S_ISDIR) && defined(S_IFDIR)
@@ -164,7 +164,7 @@ static void
 ld_cleanup (void)
 {
   bfd_cache_close_all ();
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   plugin_call_cleanup ();
 #endif
   if (output_filename && delete_output_file_on_failure)
@@ -323,10 +323,10 @@ main (int argc, char **argv)
   if (config.hash_table_size != 0)
     bfd_hash_set_default_size (config.hash_table_size);
 
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   /* Now all the plugin arguments have been gathered, we can load them.  */
   plugin_load_plugins ();
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
   ldemul_set_symbols ();
 
@@ -830,7 +830,7 @@ add_archive_element (struct bfd_link_info *info,
      (if enabled) may possibly alter it to point to a replacement
      BFD, but we still want to output the original BFD filename.  */
   orig_input = *input;
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   if (link_info.lto_plugin_active)
     {
       /* We must offer this archive member to the plugins to claim.  */
@@ -851,7 +851,7 @@ add_archive_element (struct bfd_link_info *info,
          *subsbfd = input->the_bfd;
        }
     }
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
   ldlang_add_file (input);
 
index d84b334b346e7d2e49d4482422e1173ecc9ab219..65a945318520ce840b2bd27afab761c017d8a267 100644 (file)
@@ -39,9 +39,9 @@
 #include "ldver.h"
 #include "ldemul.h"
 #include "demangle.h"
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin.h"
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
 
 #ifndef PATH_SEPARATOR
 #if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__))
@@ -174,7 +174,7 @@ static const struct ld_option ld_options[] =
     'O', NULL, N_("Optimize output file"), ONE_DASH },
   { {"out-implib", required_argument, NULL, OPTION_OUT_IMPLIB},
     '\0', N_("FILE"), N_("Generate import library"), TWO_DASHES },
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
   { {"plugin", required_argument, NULL, OPTION_PLUGIN},
     '\0', N_("PLUGIN"), N_("Load named plugin"), ONE_DASH },
   { {"plugin-opt", required_argument, NULL, OPTION_PLUGIN_OPT},
@@ -190,7 +190,7 @@ static const struct ld_option ld_options[] =
     '\0', N_("PLUGIN"), N_("Load named plugin (ignored)"), ONE_DASH },
   { {"plugin-opt", required_argument, NULL, OPTION_IGNORE},
     '\0', N_("ARG"), N_("Send arg to last-loaded plugin (ignored)"), ONE_DASH },
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
   { {"fuse-ld=", required_argument, NULL, OPTION_IGNORE},
     '\0', NULL, N_("Ignored for GCC linker option compatibility"),
     ONE_DASH },
@@ -1066,7 +1066,7 @@ parse_args (unsigned argc, char **argv)
        case OPTION_PRINT_OUTPUT_FORMAT:
          command_line.print_output_format = TRUE;
          break;
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
        case OPTION_PLUGIN:
          plugin_opt_plugin (optarg);
          break;
@@ -1074,7 +1074,7 @@ parse_args (unsigned argc, char **argv)
          if (plugin_opt_plugin_arg (optarg))
            einfo (_("%F%P: bad -plugin-opt option\n"));
          break;
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
        case 'q':
          link_info.emitrelocations = TRUE;
          break;
@@ -1368,9 +1368,9 @@ parse_args (unsigned argc, char **argv)
              int level ATTRIBUTE_UNUSED = strtoul (optarg, &end, 0);
              if (*end)
                einfo (_("%F%P: invalid number `%s'\n"), optarg);
-#ifdef ENABLE_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
              report_plugin_symbols = level > 1;
-#endif /* ENABLE_PLUGINS */
+#endif /* BFD_SUPPORTS_PLUGINS */
            }
          break;
        case 'v':
index 60beacd06276c292312aede9f3c78e301ce5663f..b455af6d6762321200f37a7103619271b99779b2 100644 (file)
@@ -21,6 +21,7 @@
 #include "sysdep.h"
 #include "libiberty.h"
 #include "bfd.h"
+#if BFD_SUPPORTS_PLUGINS
 #include "bfdlink.h"
 #include "bfdver.h"
 #include "ctf-api.h"
@@ -1462,3 +1463,4 @@ plugin_notice (struct bfd_link_info *info,
                                      abfd, section, value, flags);
   return TRUE;
 }
+#endif /* BFD_SUPPORTS_PLUGINS */
index c126f0360736b8a13e12bd1c4026c42a167c3f45..e386e8d47885e59a3e7c1084444feb6f6f6933c6 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "sysdep.h"
 #include "bfd.h"
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin-api.h"
 /* For ARRAY_SIZE macro only - we don't link the library itself.  */
 #include "libiberty.h"
@@ -669,3 +670,4 @@ oncleanup (void)
   fflush (NULL);
   return cleanup_ret;
 }
+#endif /* BFD_SUPPORTS_PLUGINS */
index 27553d07813b8e291caed595399b155c0e6ba94a..5b69d0e21b7d60ba1cb121acb7426eb927f9be16 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sysdep.h"
 #include "bfd.h"
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin-api.h"
 #include "filenames.h"
 /* For ARRAY_SIZE macro only - we don't link the library itself.  */
@@ -669,3 +670,4 @@ oncleanup (void)
   fflush (NULL);
   return cleanup_ret;
 }
+#endif /* BFD_SUPPORTS_PLUGINS */
index 928f4d68426a55842a81f706950827bd56d7dbe2..3b0e9b3b35a16a4c3d9f34f95d5afa0f30b082b5 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sysdep.h"
 #include "bfd.h"
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin-api.h"
 #include "filenames.h"
 /* For ARRAY_SIZE macro only - we don't link the library itself.  */
@@ -627,3 +628,4 @@ oncleanup (void)
   fflush (NULL);
   return cleanup_ret;
 }
+#endif /* BFD_SUPPORTS_PLUGINS */
index ca899b11da1da0f8bc8e06b5a07563e04f7640ba..6e41f81298b04e6e6ef3ea8e30fb852baa77603b 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sysdep.h"
 #include "bfd.h"
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin-api.h"
 #include "filenames.h"
 /* For ARRAY_SIZE macro only - we don't link the library itself.  */
@@ -675,3 +676,4 @@ oncleanup (void)
   fflush (NULL);
   return cleanup_ret;
 }
+#endif /* BFD_SUPPORTS_PLUGINS */
This page took 0.043083 seconds and 4 git commands to generate.