• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisão0381901e629115f5f0d92a27fe74b1814f6f389a (tree)
Hora2020-06-21 21:46:10
AutorAlan Modra <amodra@gmai...>
CommiterAlan Modra

Mensagem de Log

Do without ld ENABLE_PLUGINS

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.

Mudança Sumário

Diff

--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,24 @@
1+2020-06-21 Alan Modra <amodra@gmail.com>
2+
3+ * ldfile.c: Replace uses of ENABLE_PLUGINS with BFD_SUPPORTS_PLUGINS.
4+ * ldlang.c: Likewise.
5+ * ldlang.h: Likewise.
6+ * ldlex.h: Likewise.
7+ * ldmain.c: Likewise.
8+ * lexsup.c: Likewise.
9+ * plugin.c: Wrap body of file in #if BFD_SUPPORTS_PLUGINS.
10+ * testplug.c: Likewise.
11+ * testplug2.c: Likewise.
12+ * testplug3.c: Likewise.
13+ * testplug4.c: Likewise.
14+ * configure.ac (ENABLE_PLUGINS): Don't define AM_CONTITIONAL.
15+ * Makefile.am: Remove ENABLE_PLUGINS conditionals.
16+ (PLUGIN_CFLAGS): Don't define.
17+ (PLUGIN_C, PLUGIN_H, PLUGIN_OBJECT): Likewise. Substitute all
18+ uses with plugin file name.
19+ * configure: Regenerate.
20+ * Makefile.in: Regenerate.
21+
122 2020-06-20 Alan Modra <amodra@gmail.com>
223
324 * testsuite/lib/ld-lib.exp (default_ld_compile): Don't perror on
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -47,19 +47,6 @@ WARN_CFLAGS = @WARN_CFLAGS@
4747 NO_WERROR = @NO_WERROR@
4848 AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
4949
50-# Conditionally enable the plugin interface.
51-if ENABLE_PLUGINS
52-PLUGIN_C = plugin.c
53-PLUGIN_H = plugin.h
54-PLUGIN_OBJECT = plugin.@OBJEXT@
55-PLUGIN_CFLAGS = -DENABLE_PLUGINS
56-else
57-PLUGIN_C =
58-PLUGIN_H =
59-PLUGIN_OBJECT =
60-PLUGIN_CFLAGS =
61-endif
62-
6350 # We put the scripts in the directory $(scriptdir)/ldscripts.
6451 # We can't put the scripts in $(datadir) because the SEARCH_DIR
6552 # directives need to be different for native and cross linkers.
@@ -152,7 +139,7 @@ TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
152139 -I $(top_srcdir)/../libiberty
153140
154141 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @zlibinc@ \
155- @INCINTL@ $(HDEFINES) $(CFLAGS) $(PLUGIN_CFLAGS) \
142+ @INCINTL@ $(HDEFINES) $(CFLAGS) \
156143 -DLOCALEDIR="\"$(datadir)/locale\""
157144
158145 BFDLIB = ../bfd/libbfd.la
@@ -482,12 +469,12 @@ ALL_64_EMUL_EXTRA_OFILES = \
482469 CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
483470 ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
484471 mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \
485- $(PLUGIN_C) ldbuildid.c ldelf.c ldelfgen.c
472+ plugin.c ldbuildid.c ldelf.c ldelfgen.c
486473
487474 HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
488475 ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
489476 ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h \
490- elf-hints-local.h $(PLUGIN_H) ldbuildid.h ldelf.h ldelfgen.h
477+ elf-hints-local.h plugin.h ldbuildid.h ldelf.h ldelfgen.h
491478
492479 GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
493480 GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
@@ -497,7 +484,7 @@ GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
497484 BUILT_SOURCES = $(GENERATED_HFILES)
498485
499486 OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@ \
500- mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ $(PLUGIN_OBJECT) \
487+ mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ plugin.@OBJEXT@ \
501488 ldwrite.@OBJEXT@ ldexp.@OBJEXT@ ldemul.@OBJEXT@ ldver.@OBJEXT@ ldmisc.@OBJEXT@ \
502489 ldfile.@OBJEXT@ ldcref.@OBJEXT@ ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES} \
503490 ldbuildid.@OBJEXT@
@@ -959,7 +946,7 @@ EXTRA_ld_new_SOURCES = deffilep.y ldlex.l
959946 EXTRA_ld_new_SOURCES += pep-dll.c pe-dll.c ldelf.c ldelfgen.c
960947
961948 ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
962- ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c $(PLUGIN_C) \
949+ ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c \
963950 ldbuildid.c
964951 ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \
965952 $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL_DEP)
@@ -997,7 +984,6 @@ development.exp: $(BFDDIR)/development.sh
997984 #
998985 # Build a dummy plugin using libtool.
999986 #
1000-if ENABLE_PLUGINS
1001987 noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
1002988 libldtestplug3.la libldtestplug4.la
1003989 libldtestplug_la_SOURCES = testplug.c
@@ -1012,7 +998,6 @@ libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
1012998 libldtestplug4_la_SOURCES = testplug4.c
1013999 libldtestplug4_la_CFLAGS= -g -O2
10141000 libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
1015-endif
10161001
10171002 # DOCUMENTATION TARGETS
10181003 # Manual configuration file; not usually attached to normal configuration,
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -138,8 +138,7 @@ CONFIG_CLEAN_FILES = po/Makefile.in
138138 CONFIG_CLEAN_VPATH_FILES =
139139 LTLIBRARIES = $(noinst_LTLIBRARIES)
140140 libldtestplug_la_LIBADD =
141-@ENABLE_PLUGINS_TRUE@am_libldtestplug_la_OBJECTS = \
142-@ENABLE_PLUGINS_TRUE@ libldtestplug_la-testplug.lo
141+am_libldtestplug_la_OBJECTS = libldtestplug_la-testplug.lo
143142 libldtestplug_la_OBJECTS = $(am_libldtestplug_la_OBJECTS)
144143 AM_V_lt = $(am__v_lt_@AM_V@)
145144 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -149,44 +148,36 @@ libldtestplug_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
149148 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
150149 $(libldtestplug_la_CFLAGS) $(CFLAGS) \
151150 $(libldtestplug_la_LDFLAGS) $(LDFLAGS) -o $@
152-@ENABLE_PLUGINS_TRUE@am_libldtestplug_la_rpath =
153151 libldtestplug2_la_LIBADD =
154-@ENABLE_PLUGINS_TRUE@am_libldtestplug2_la_OBJECTS = \
155-@ENABLE_PLUGINS_TRUE@ libldtestplug2_la-testplug2.lo
152+am_libldtestplug2_la_OBJECTS = libldtestplug2_la-testplug2.lo
156153 libldtestplug2_la_OBJECTS = $(am_libldtestplug2_la_OBJECTS)
157154 libldtestplug2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
158155 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
159156 $(libldtestplug2_la_CFLAGS) $(CFLAGS) \
160157 $(libldtestplug2_la_LDFLAGS) $(LDFLAGS) -o $@
161-@ENABLE_PLUGINS_TRUE@am_libldtestplug2_la_rpath =
162158 libldtestplug3_la_LIBADD =
163-@ENABLE_PLUGINS_TRUE@am_libldtestplug3_la_OBJECTS = \
164-@ENABLE_PLUGINS_TRUE@ libldtestplug3_la-testplug3.lo
159+am_libldtestplug3_la_OBJECTS = libldtestplug3_la-testplug3.lo
165160 libldtestplug3_la_OBJECTS = $(am_libldtestplug3_la_OBJECTS)
166161 libldtestplug3_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
167162 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
168163 $(libldtestplug3_la_CFLAGS) $(CFLAGS) \
169164 $(libldtestplug3_la_LDFLAGS) $(LDFLAGS) -o $@
170-@ENABLE_PLUGINS_TRUE@am_libldtestplug3_la_rpath =
171165 libldtestplug4_la_LIBADD =
172-@ENABLE_PLUGINS_TRUE@am_libldtestplug4_la_OBJECTS = \
173-@ENABLE_PLUGINS_TRUE@ libldtestplug4_la-testplug4.lo
166+am_libldtestplug4_la_OBJECTS = libldtestplug4_la-testplug4.lo
174167 libldtestplug4_la_OBJECTS = $(am_libldtestplug4_la_OBJECTS)
175168 libldtestplug4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
176169 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
177170 $(libldtestplug4_la_CFLAGS) $(CFLAGS) \
178171 $(libldtestplug4_la_LDFLAGS) $(LDFLAGS) -o $@
179-@ENABLE_PLUGINS_TRUE@am_libldtestplug4_la_rpath =
180172 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
181173 "$(DESTDIR)$(man1dir)"
182174 PROGRAMS = $(bin_PROGRAMS)
183-@ENABLE_PLUGINS_TRUE@am__objects_1 = plugin.$(OBJEXT)
184175 am_ld_new_OBJECTS = ldgram.$(OBJEXT) ldlex-wrapper.$(OBJEXT) \
185176 lexsup.$(OBJEXT) ldlang.$(OBJEXT) mri.$(OBJEXT) \
186177 ldctor.$(OBJEXT) ldmain.$(OBJEXT) ldwrite.$(OBJEXT) \
187178 ldexp.$(OBJEXT) ldemul.$(OBJEXT) ldver.$(OBJEXT) \
188179 ldmisc.$(OBJEXT) ldfile.$(OBJEXT) ldcref.$(OBJEXT) \
189- $(am__objects_1) ldbuildid.$(OBJEXT)
180+ plugin.$(OBJEXT) ldbuildid.$(OBJEXT)
190181 ld_new_OBJECTS = $(am_ld_new_OBJECTS)
191182 am__DEPENDENCIES_1 =
192183 AM_V_P = $(am__v_P_@AM_V@)
@@ -558,16 +549,6 @@ ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
558549 -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
559550
560551 AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
561-@ENABLE_PLUGINS_FALSE@PLUGIN_C =
562-
563-# Conditionally enable the plugin interface.
564-@ENABLE_PLUGINS_TRUE@PLUGIN_C = plugin.c
565-@ENABLE_PLUGINS_FALSE@PLUGIN_H =
566-@ENABLE_PLUGINS_TRUE@PLUGIN_H = plugin.h
567-@ENABLE_PLUGINS_FALSE@PLUGIN_OBJECT =
568-@ENABLE_PLUGINS_TRUE@PLUGIN_OBJECT = plugin.@OBJEXT@
569-@ENABLE_PLUGINS_FALSE@PLUGIN_CFLAGS =
570-@ENABLE_PLUGINS_TRUE@PLUGIN_CFLAGS = -DENABLE_PLUGINS
571552
572553 # We put the scripts in the directory $(scriptdir)/ldscripts.
573554 # 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 \
642623 -I $(top_srcdir)/../libiberty
643624
644625 AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @zlibinc@ \
645- @INCINTL@ $(HDEFINES) $(CFLAGS) $(PLUGIN_CFLAGS) \
626+ @INCINTL@ $(HDEFINES) $(CFLAGS) \
646627 -DLOCALEDIR="\"$(datadir)/locale\""
647628
648629 BFDLIB = ../bfd/libbfd.la
@@ -970,12 +951,12 @@ ALL_64_EMUL_EXTRA_OFILES = \
970951 CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
971952 ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
972953 mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \
973- $(PLUGIN_C) ldbuildid.c ldelf.c ldelfgen.c
954+ plugin.c ldbuildid.c ldelf.c ldelfgen.c
974955
975956 HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
976957 ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
977958 ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h \
978- elf-hints-local.h $(PLUGIN_H) ldbuildid.h ldelf.h ldelfgen.h
959+ elf-hints-local.h plugin.h ldbuildid.h ldelf.h ldelfgen.h
979960
980961 GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
981962 GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
@@ -984,7 +965,7 @@ GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
984965 # tracking will not cause them to be built beforehand.
985966 BUILT_SOURCES = $(GENERATED_HFILES)
986967 OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@ \
987- mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ $(PLUGIN_OBJECT) \
968+ mri.@OBJEXT@ ldctor.@OBJEXT@ ldmain.@OBJEXT@ plugin.@OBJEXT@ \
988969 ldwrite.@OBJEXT@ ldexp.@OBJEXT@ ldemul.@OBJEXT@ ldver.@OBJEXT@ ldmisc.@OBJEXT@ \
989970 ldfile.@OBJEXT@ ldcref.@OBJEXT@ ${EMULATION_OFILES} ${EMUL_EXTRA_OFILES} \
990971 ldbuildid.@OBJEXT@
@@ -1005,7 +986,7 @@ EXTRA_ld_new_SOURCES = deffilep.y ldlex.l pep-dll.c pe-dll.c ldelf.c \
1005986 ldelfgen.c $(ALL_EMULATION_SOURCES) \
1006987 $(ALL_64_EMULATION_SOURCES)
1007988 ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
1008- ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c $(PLUGIN_C) \
989+ ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c \
1009990 ldbuildid.c
1010991
1011992 ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \
@@ -1016,21 +997,21 @@ ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBCTF) $(LI
1016997 #
1017998 # Build a dummy plugin using libtool.
1018999 #
1019-@ENABLE_PLUGINS_TRUE@noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
1020-@ENABLE_PLUGINS_TRUE@ libldtestplug3.la libldtestplug4.la
1021-
1022-@ENABLE_PLUGINS_TRUE@libldtestplug_la_SOURCES = testplug.c
1023-@ENABLE_PLUGINS_TRUE@libldtestplug_la_CFLAGS = -g -O2
1024-@ENABLE_PLUGINS_TRUE@libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere
1025-@ENABLE_PLUGINS_TRUE@libldtestplug2_la_SOURCES = testplug2.c
1026-@ENABLE_PLUGINS_TRUE@libldtestplug2_la_CFLAGS = -g -O2
1027-@ENABLE_PLUGINS_TRUE@libldtestplug2_la_LDFLAGS = -no-undefined -rpath /nowhere
1028-@ENABLE_PLUGINS_TRUE@libldtestplug3_la_SOURCES = testplug3.c
1029-@ENABLE_PLUGINS_TRUE@libldtestplug3_la_CFLAGS = -g -O2
1030-@ENABLE_PLUGINS_TRUE@libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
1031-@ENABLE_PLUGINS_TRUE@libldtestplug4_la_SOURCES = testplug4.c
1032-@ENABLE_PLUGINS_TRUE@libldtestplug4_la_CFLAGS = -g -O2
1033-@ENABLE_PLUGINS_TRUE@libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
1000+noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
1001+ libldtestplug3.la libldtestplug4.la
1002+
1003+libldtestplug_la_SOURCES = testplug.c
1004+libldtestplug_la_CFLAGS = -g -O2
1005+libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere
1006+libldtestplug2_la_SOURCES = testplug2.c
1007+libldtestplug2_la_CFLAGS = -g -O2
1008+libldtestplug2_la_LDFLAGS = -no-undefined -rpath /nowhere
1009+libldtestplug3_la_SOURCES = testplug3.c
1010+libldtestplug3_la_CFLAGS = -g -O2
1011+libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
1012+libldtestplug4_la_SOURCES = testplug4.c
1013+libldtestplug4_la_CFLAGS = -g -O2
1014+libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
10341015 MAINTAINERCLEANFILES = configdoc.texi ld.1 ld.info
10351016
10361017 # We want to reconfigure if configure.host or configure.tgt changes.
@@ -1118,16 +1099,16 @@ clean-noinstLTLIBRARIES:
11181099 }
11191100
11201101 libldtestplug.la: $(libldtestplug_la_OBJECTS) $(libldtestplug_la_DEPENDENCIES) $(EXTRA_libldtestplug_la_DEPENDENCIES)
1121- $(AM_V_CCLD)$(libldtestplug_la_LINK) $(am_libldtestplug_la_rpath) $(libldtestplug_la_OBJECTS) $(libldtestplug_la_LIBADD) $(LIBS)
1102+ $(AM_V_CCLD)$(libldtestplug_la_LINK) $(libldtestplug_la_OBJECTS) $(libldtestplug_la_LIBADD) $(LIBS)
11221103
11231104 libldtestplug2.la: $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_DEPENDENCIES) $(EXTRA_libldtestplug2_la_DEPENDENCIES)
1124- $(AM_V_CCLD)$(libldtestplug2_la_LINK) $(am_libldtestplug2_la_rpath) $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_LIBADD) $(LIBS)
1105+ $(AM_V_CCLD)$(libldtestplug2_la_LINK) $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_LIBADD) $(LIBS)
11251106
11261107 libldtestplug3.la: $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_DEPENDENCIES) $(EXTRA_libldtestplug3_la_DEPENDENCIES)
1127- $(AM_V_CCLD)$(libldtestplug3_la_LINK) $(am_libldtestplug3_la_rpath) $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_LIBADD) $(LIBS)
1108+ $(AM_V_CCLD)$(libldtestplug3_la_LINK) $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_LIBADD) $(LIBS)
11281109
11291110 libldtestplug4.la: $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_DEPENDENCIES) $(EXTRA_libldtestplug4_la_DEPENDENCIES)
1130- $(AM_V_CCLD)$(libldtestplug4_la_LINK) $(am_libldtestplug4_la_rpath) $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_LIBADD) $(LIBS)
1111+ $(AM_V_CCLD)$(libldtestplug4_la_LINK) $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_LIBADD) $(LIBS)
11311112 install-binPROGRAMS: $(bin_PROGRAMS)
11321113 @$(NORMAL_INSTALL)
11331114 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
--- a/ld/configure
+++ b/ld/configure
@@ -649,8 +649,6 @@ STRINGIFY
649649 zlibinc
650650 zlibdir
651651 enable_initfini_array
652-ENABLE_PLUGINS_FALSE
653-ENABLE_PLUGINS_TRUE
654652 NATIVE_LIB_DIRS
655653 HDEFINES
656654 do_compare
@@ -12035,7 +12033,7 @@ else
1203512033 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1203612034 lt_status=$lt_dlunknown
1203712035 cat > conftest.$ac_ext <<_LT_EOF
12038-#line 12038 "configure"
12036+#line 12036 "configure"
1203912037 #include "confdefs.h"
1204012038
1204112039 #if HAVE_DLFCN_H
@@ -12141,7 +12139,7 @@ else
1214112139 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1214212140 lt_status=$lt_dlunknown
1214312141 cat > conftest.$ac_ext <<_LT_EOF
12144-#line 12144 "configure"
12142+#line 12142 "configure"
1214512143 #include "confdefs.h"
1214612144
1214712145 #if HAVE_DLFCN_H
@@ -17285,14 +17283,6 @@ if test "$ac_res" != no; then :
1728517283
1728617284 fi
1728717285
17288- if test x$plugins = xyes; then
17289- ENABLE_PLUGINS_TRUE=
17290- ENABLE_PLUGINS_FALSE='#'
17291-else
17292- ENABLE_PLUGINS_TRUE='#'
17293- ENABLE_PLUGINS_FALSE=
17294-fi
17295-
1729617286
1729717287 # Check whether --enable-initfini-array was given.
1729817288 if test "${enable_initfini_array+set}" = set; then :
@@ -17890,10 +17880,6 @@ if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then
1789017880 as_fn_error $? "conditional \"GENINSRC_NEVER\" was never defined.
1789117881 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1789217882 fi
17893-if test -z "${ENABLE_PLUGINS_TRUE}" && test -z "${ENABLE_PLUGINS_FALSE}"; then
17894- as_fn_error $? "conditional \"ENABLE_PLUGINS\" was never defined.
17895-Usually this means the macro was only invoked conditionally." "$LINENO" 5
17896-fi
1789717883
1789817884 : "${CONFIG_STATUS=./config.status}"
1789917885 ac_write_fail=0
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -274,7 +274,6 @@ dnl AC_CHECK_HEADERS(sys/mman.h)
274274 AC_FUNC_MMAP
275275
276276 AC_SEARCH_LIBS([dlopen], [dl])
277-AM_CONDITIONAL([ENABLE_PLUGINS], [test x$plugins = xyes])
278277
279278 AC_ARG_ENABLE(initfini-array,
280279 [ --disable-initfini-array do not use .init_array/.fini_array sections],
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -34,10 +34,10 @@
3434 #include "ldemul.h"
3535 #include "libiberty.h"
3636 #include "filenames.h"
37-#ifdef ENABLE_PLUGINS
37+#if BFD_SUPPORTS_PLUGINS
3838 #include "plugin-api.h"
3939 #include "plugin.h"
40-#endif /* ENABLE_PLUGINS */
40+#endif /* BFD_SUPPORTS_PLUGINS */
4141
4242 bfd_boolean ldfile_assumed_script = FALSE;
4343 const char *ldfile_output_machine_name = "";
@@ -148,7 +148,7 @@ ldfile_try_open_bfd (const char *attempt,
148148 /* This is a linker input BFD. */
149149 entry->the_bfd->is_linker_input = 1;
150150
151-#ifdef ENABLE_PLUGINS
151+#if BFD_SUPPORTS_PLUGINS
152152 if (entry->flags.lto_output)
153153 entry->the_bfd->lto_output = 1;
154154 #endif
@@ -302,7 +302,7 @@ ldfile_try_open_bfd (const char *attempt,
302302 }
303303 }
304304 success:
305-#ifdef ENABLE_PLUGINS
305+#if BFD_SUPPORTS_PLUGINS
306306 /* If plugins are active, they get first chance to claim
307307 any successfully-opened input file. We skip archives
308308 here; the plugin wants us to offer it the individual
@@ -316,7 +316,7 @@ ldfile_try_open_bfd (const char *attempt,
316316 && !no_more_claiming
317317 && bfd_check_format (entry->the_bfd, bfd_object))
318318 plugin_maybe_claim (entry);
319-#endif /* ENABLE_PLUGINS */
319+#endif /* BFD_SUPPORTS_PLUGINS */
320320
321321 /* It opened OK, the format checked out, and the plugins have had
322322 their chance to claim it, so this is success. */
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -42,9 +42,9 @@
4242 #include "demangle.h"
4343 #include "hashtab.h"
4444 #include "elf-bfd.h"
45-#ifdef ENABLE_PLUGINS
45+#if BFD_SUPPORTS_PLUGINS
4646 #include "plugin.h"
47-#endif /* ENABLE_PLUGINS */
47+#endif /* BFD_SUPPORTS_PLUGINS */
4848
4949 #ifndef offsetof
5050 #define offsetof(TYPE, MEMBER) ((size_t) & (((TYPE*) 0)->MEMBER))
@@ -3526,7 +3526,7 @@ enum open_bfd_mode
35263526 OPEN_BFD_FORCE = 1,
35273527 OPEN_BFD_RESCAN = 2
35283528 };
3529-#ifdef ENABLE_PLUGINS
3529+#if BFD_SUPPORTS_PLUGINS
35303530 static lang_input_statement_type *plugin_insert = NULL;
35313531 static struct bfd_link_hash_entry *plugin_undefs = NULL;
35323532 #endif
@@ -3556,7 +3556,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
35563556 case lang_group_statement_enum:
35573557 {
35583558 struct bfd_link_hash_entry *undefs;
3559-#ifdef ENABLE_PLUGINS
3559+#if BFD_SUPPORTS_PLUGINS
35603560 lang_input_statement_type *plugin_insert_save;
35613561 #endif
35623562
@@ -3566,7 +3566,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
35663566
35673567 do
35683568 {
3569-#ifdef ENABLE_PLUGINS
3569+#if BFD_SUPPORTS_PLUGINS
35703570 plugin_insert_save = plugin_insert;
35713571 #endif
35723572 undefs = link_info.hash->undefs_tail;
@@ -3574,7 +3574,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
35743574 mode | OPEN_BFD_FORCE);
35753575 }
35763576 while (undefs != link_info.hash->undefs_tail
3577-#ifdef ENABLE_PLUGINS
3577+#if BFD_SUPPORTS_PLUGINS
35783578 /* Objects inserted by a plugin, which are loaded
35793579 before we hit this loop, may have added new
35803580 undefs. */
@@ -3601,7 +3601,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
36013601 has been loaded already. Do the same for a rescan.
36023602 Likewise reload --as-needed shared libs. */
36033603 if (mode != OPEN_BFD_NORMAL
3604-#ifdef ENABLE_PLUGINS
3604+#if BFD_SUPPORTS_PLUGINS
36053605 && ((mode & OPEN_BFD_RESCAN) == 0
36063606 || plugin_insert == NULL)
36073607 #endif
@@ -3648,7 +3648,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
36483648 }
36493649 }
36503650 }
3651-#ifdef ENABLE_PLUGINS
3651+#if BFD_SUPPORTS_PLUGINS
36523652 /* If we have found the point at which a plugin added new
36533653 files, clear plugin_insert to enable archive rescan. */
36543654 if (&s->input_statement == plugin_insert)
@@ -6899,11 +6899,11 @@ lang_check (void)
68996899 file != NULL;
69006900 file = file->next)
69016901 {
6902-#ifdef ENABLE_PLUGINS
6902+#if BFD_SUPPORTS_PLUGINS
69036903 /* Don't check format of files claimed by plugin. */
69046904 if (file->flags.claimed)
69056905 continue;
6906-#endif /* ENABLE_PLUGINS */
6906+#endif /* BFD_SUPPORTS_PLUGINS */
69076907 input_bfd = file->the_bfd;
69086908 compatible
69096909 = bfd_arch_get_compatible (input_bfd, link_info.output_bfd,
@@ -7438,7 +7438,7 @@ lang_gc_sections (void)
74387438 LANG_FOR_EACH_INPUT_STATEMENT (f)
74397439 {
74407440 asection *sec;
7441-#ifdef ENABLE_PLUGINS
7441+#if BFD_SUPPORTS_PLUGINS
74427442 if (f->flags.claimed)
74437443 continue;
74447444 #endif
@@ -7585,7 +7585,7 @@ lang_relax_sections (bfd_boolean need_layout)
75857585 }
75867586 }
75877587
7588-#ifdef ENABLE_PLUGINS
7588+#if BFD_SUPPORTS_PLUGINS
75897589 /* Find the insert point for the plugin's replacement files. We
75907590 place them after the first claimed real object file, or if the
75917591 first claimed object is an archive member, after the last real
@@ -7728,7 +7728,7 @@ find_next_input_statement (lang_statement_union_type **s)
77287728 }
77297729 return s;
77307730 }
7731-#endif /* ENABLE_PLUGINS */
7731+#endif /* BFD_SUPPORTS_PLUGINS */
77327732
77337733 /* Add NAME to the list of garbage collection entry points. */
77347734
@@ -7819,7 +7819,7 @@ lang_process (void)
78197819 to symbolic origin/length now. */
78207820 lang_do_memory_regions ();
78217821
7822-#ifdef ENABLE_PLUGINS
7822+#if BFD_SUPPORTS_PLUGINS
78237823 if (link_info.lto_plugin_active)
78247824 {
78257825 lang_statement_list_type added;
@@ -7922,7 +7922,7 @@ lang_process (void)
79227922 }
79237923 }
79247924 }
7925-#endif /* ENABLE_PLUGINS */
7925+#endif /* BFD_SUPPORTS_PLUGINS */
79267926
79277927 /* Make sure that nobody has tried to add a symbol to this list
79287928 before now. */
--- a/ld/ldlang.h
+++ b/ld/ldlang.h
@@ -271,7 +271,7 @@ struct lang_input_statement_flags
271271 /* Set if reloading an archive or --as-needed lib. */
272272 unsigned int reload : 1;
273273
274-#ifdef ENABLE_PLUGINS
274+#if BFD_SUPPORTS_PLUGINS
275275 /* Set if the file was claimed by a plugin. */
276276 unsigned int claimed : 1;
277277
@@ -280,7 +280,7 @@ struct lang_input_statement_flags
280280
281281 /* Set if added by the lto plugin add_input_file callback. */
282282 unsigned int lto_output : 1;
283-#endif /* ENABLE_PLUGINS */
283+#endif /* BFD_SUPPORTS_PLUGINS */
284284
285285 /* Head of list of pushed flags. */
286286 struct lang_input_statement_flags *pushed;
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -135,10 +135,10 @@ enum option_values
135135 OPTION_WARN_TEXTREL,
136136 OPTION_WARN_ALTERNATE_EM,
137137 OPTION_REDUCE_MEMORY_OVERHEADS,
138-#ifdef ENABLE_PLUGINS
138+#if BFD_SUPPORTS_PLUGINS
139139 OPTION_PLUGIN,
140140 OPTION_PLUGIN_OPT,
141-#endif /* ENABLE_PLUGINS */
141+#endif /* BFD_SUPPORTS_PLUGINS */
142142 OPTION_DEFAULT_SCRIPT,
143143 OPTION_PRINT_OUTPUT_FORMAT,
144144 OPTION_PRINT_SYSROOT,
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -40,10 +40,10 @@
4040 #include "ldfile.h"
4141 #include "ldemul.h"
4242 #include "ldctor.h"
43-#ifdef ENABLE_PLUGINS
43+#if BFD_SUPPORTS_PLUGINS
4444 #include "plugin.h"
4545 #include "plugin-api.h"
46-#endif /* ENABLE_PLUGINS */
46+#endif /* BFD_SUPPORTS_PLUGINS */
4747
4848 /* Somewhere above, sys/stat.h got included. */
4949 #if !defined(S_ISDIR) && defined(S_IFDIR)
@@ -164,7 +164,7 @@ static void
164164 ld_cleanup (void)
165165 {
166166 bfd_cache_close_all ();
167-#ifdef ENABLE_PLUGINS
167+#if BFD_SUPPORTS_PLUGINS
168168 plugin_call_cleanup ();
169169 #endif
170170 if (output_filename && delete_output_file_on_failure)
@@ -323,10 +323,10 @@ main (int argc, char **argv)
323323 if (config.hash_table_size != 0)
324324 bfd_hash_set_default_size (config.hash_table_size);
325325
326-#ifdef ENABLE_PLUGINS
326+#if BFD_SUPPORTS_PLUGINS
327327 /* Now all the plugin arguments have been gathered, we can load them. */
328328 plugin_load_plugins ();
329-#endif /* ENABLE_PLUGINS */
329+#endif /* BFD_SUPPORTS_PLUGINS */
330330
331331 ldemul_set_symbols ();
332332
@@ -830,7 +830,7 @@ add_archive_element (struct bfd_link_info *info,
830830 (if enabled) may possibly alter it to point to a replacement
831831 BFD, but we still want to output the original BFD filename. */
832832 orig_input = *input;
833-#ifdef ENABLE_PLUGINS
833+#if BFD_SUPPORTS_PLUGINS
834834 if (link_info.lto_plugin_active)
835835 {
836836 /* We must offer this archive member to the plugins to claim. */
@@ -851,7 +851,7 @@ add_archive_element (struct bfd_link_info *info,
851851 *subsbfd = input->the_bfd;
852852 }
853853 }
854-#endif /* ENABLE_PLUGINS */
854+#endif /* BFD_SUPPORTS_PLUGINS */
855855
856856 ldlang_add_file (input);
857857
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -39,9 +39,9 @@
3939 #include "ldver.h"
4040 #include "ldemul.h"
4141 #include "demangle.h"
42-#ifdef ENABLE_PLUGINS
42+#if BFD_SUPPORTS_PLUGINS
4343 #include "plugin.h"
44-#endif /* ENABLE_PLUGINS */
44+#endif /* BFD_SUPPORTS_PLUGINS */
4545
4646 #ifndef PATH_SEPARATOR
4747 #if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN32__))
@@ -174,7 +174,7 @@ static const struct ld_option ld_options[] =
174174 'O', NULL, N_("Optimize output file"), ONE_DASH },
175175 { {"out-implib", required_argument, NULL, OPTION_OUT_IMPLIB},
176176 '\0', N_("FILE"), N_("Generate import library"), TWO_DASHES },
177-#ifdef ENABLE_PLUGINS
177+#if BFD_SUPPORTS_PLUGINS
178178 { {"plugin", required_argument, NULL, OPTION_PLUGIN},
179179 '\0', N_("PLUGIN"), N_("Load named plugin"), ONE_DASH },
180180 { {"plugin-opt", required_argument, NULL, OPTION_PLUGIN_OPT},
@@ -190,7 +190,7 @@ static const struct ld_option ld_options[] =
190190 '\0', N_("PLUGIN"), N_("Load named plugin (ignored)"), ONE_DASH },
191191 { {"plugin-opt", required_argument, NULL, OPTION_IGNORE},
192192 '\0', N_("ARG"), N_("Send arg to last-loaded plugin (ignored)"), ONE_DASH },
193-#endif /* ENABLE_PLUGINS */
193+#endif /* BFD_SUPPORTS_PLUGINS */
194194 { {"fuse-ld=", required_argument, NULL, OPTION_IGNORE},
195195 '\0', NULL, N_("Ignored for GCC linker option compatibility"),
196196 ONE_DASH },
@@ -1066,7 +1066,7 @@ parse_args (unsigned argc, char **argv)
10661066 case OPTION_PRINT_OUTPUT_FORMAT:
10671067 command_line.print_output_format = TRUE;
10681068 break;
1069-#ifdef ENABLE_PLUGINS
1069+#if BFD_SUPPORTS_PLUGINS
10701070 case OPTION_PLUGIN:
10711071 plugin_opt_plugin (optarg);
10721072 break;
@@ -1074,7 +1074,7 @@ parse_args (unsigned argc, char **argv)
10741074 if (plugin_opt_plugin_arg (optarg))
10751075 einfo (_("%F%P: bad -plugin-opt option\n"));
10761076 break;
1077-#endif /* ENABLE_PLUGINS */
1077+#endif /* BFD_SUPPORTS_PLUGINS */
10781078 case 'q':
10791079 link_info.emitrelocations = TRUE;
10801080 break;
@@ -1368,9 +1368,9 @@ parse_args (unsigned argc, char **argv)
13681368 int level ATTRIBUTE_UNUSED = strtoul (optarg, &end, 0);
13691369 if (*end)
13701370 einfo (_("%F%P: invalid number `%s'\n"), optarg);
1371-#ifdef ENABLE_PLUGINS
1371+#if BFD_SUPPORTS_PLUGINS
13721372 report_plugin_symbols = level > 1;
1373-#endif /* ENABLE_PLUGINS */
1373+#endif /* BFD_SUPPORTS_PLUGINS */
13741374 }
13751375 break;
13761376 case 'v':
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -21,6 +21,7 @@
2121 #include "sysdep.h"
2222 #include "libiberty.h"
2323 #include "bfd.h"
24+#if BFD_SUPPORTS_PLUGINS
2425 #include "bfdlink.h"
2526 #include "bfdver.h"
2627 #include "ctf-api.h"
@@ -1462,3 +1463,4 @@ plugin_notice (struct bfd_link_info *info,
14621463 abfd, section, value, flags);
14631464 return TRUE;
14641465 }
1466+#endif /* BFD_SUPPORTS_PLUGINS */
--- a/ld/testplug.c
+++ b/ld/testplug.c
@@ -20,6 +20,7 @@
2020
2121 #include "sysdep.h"
2222 #include "bfd.h"
23+#if BFD_SUPPORTS_PLUGINS
2324 #include "plugin-api.h"
2425 /* For ARRAY_SIZE macro only - we don't link the library itself. */
2526 #include "libiberty.h"
@@ -669,3 +670,4 @@ oncleanup (void)
669670 fflush (NULL);
670671 return cleanup_ret;
671672 }
673+#endif /* BFD_SUPPORTS_PLUGINS */
--- a/ld/testplug2.c
+++ b/ld/testplug2.c
@@ -21,6 +21,7 @@
2121
2222 #include "sysdep.h"
2323 #include "bfd.h"
24+#if BFD_SUPPORTS_PLUGINS
2425 #include "plugin-api.h"
2526 #include "filenames.h"
2627 /* For ARRAY_SIZE macro only - we don't link the library itself. */
@@ -669,3 +670,4 @@ oncleanup (void)
669670 fflush (NULL);
670671 return cleanup_ret;
671672 }
673+#endif /* BFD_SUPPORTS_PLUGINS */
--- a/ld/testplug3.c
+++ b/ld/testplug3.c
@@ -21,6 +21,7 @@
2121
2222 #include "sysdep.h"
2323 #include "bfd.h"
24+#if BFD_SUPPORTS_PLUGINS
2425 #include "plugin-api.h"
2526 #include "filenames.h"
2627 /* For ARRAY_SIZE macro only - we don't link the library itself. */
@@ -627,3 +628,4 @@ oncleanup (void)
627628 fflush (NULL);
628629 return cleanup_ret;
629630 }
631+#endif /* BFD_SUPPORTS_PLUGINS */
--- a/ld/testplug4.c
+++ b/ld/testplug4.c
@@ -21,6 +21,7 @@
2121
2222 #include "sysdep.h"
2323 #include "bfd.h"
24+#if BFD_SUPPORTS_PLUGINS
2425 #include "plugin-api.h"
2526 #include "filenames.h"
2627 /* For ARRAY_SIZE macro only - we don't link the library itself. */
@@ -675,3 +676,4 @@ oncleanup (void)
675676 fflush (NULL);
676677 return cleanup_ret;
677678 }
679+#endif /* BFD_SUPPORTS_PLUGINS */