aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-06-21 14:23:46 +0930
committerAlan Modra <amodra@gmail.com>2020-06-21 22:16:10 +0930
commit0381901e629115f5f0d92a27fe74b1814f6f389a (patch)
tree70d1c2ebef5f3039131b03ae96d7af9841a77f03 /ld/ldmain.c
parent48e9cc84058771da089a2e8e652f70ac20a8fac0 (diff)
downloadgdb-0381901e629115f5f0d92a27fe74b1814f6f389a.zip
gdb-0381901e629115f5f0d92a27fe74b1814f6f389a.tar.gz
gdb-0381901e629115f5f0d92a27fe74b1814f6f389a.tar.bz2
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.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index b0ce69f..d34d30a 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -40,10 +40,10 @@
#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);