diff options
author | Markus Trippelsdorf <markus@trippelsdorf.de> | 2014-04-03 11:33:17 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-04-03 11:33:17 +0100 |
commit | 92b1b67865c719e83d12578e584ca5e20d172eac (patch) | |
tree | e8d46fd9b5c907240e9dc5a95dbc66d99235fa1b /binutils/ar.c | |
parent | 965b60c9460bb63c3c6fbb749b6a2deb541f422f (diff) | |
download | gdb-92b1b67865c719e83d12578e584ca5e20d172eac.zip gdb-92b1b67865c719e83d12578e584ca5e20d172eac.tar.gz gdb-92b1b67865c719e83d12578e584ca5e20d172eac.tar.bz2 |
This patch allows one to place the gcc's liblto_plugin in the lib/bfd-plugins directory
and have it loaded by default (as long as the --target option isn't used).
PR binutils/14698
ar.c: Set plugin_target early if plugins are supported.
nm.c: Likewise.
Diffstat (limited to 'binutils/ar.c')
-rw-r--r-- | binutils/ar.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/binutils/ar.c b/binutils/ar.c index 69f20f9..ebd9528 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -138,7 +138,11 @@ static int show_version = 0; static int show_help = 0; +#if BFD_SUPPORTS_PLUGINS +static const char *plugin_target = "plugin"; +#else static const char *plugin_target = NULL; +#endif static const char *target = NULL; @@ -571,7 +575,6 @@ decode_options (int argc, char **argv) break; case OPTION_PLUGIN: #if BFD_SUPPORTS_PLUGINS - plugin_target = "plugin"; bfd_plugin_set_plugin (optarg); #else fprintf (stderr, _("sorry - this program has been built without plugin support\n")); @@ -632,7 +635,6 @@ ranlib_main (int argc, char **argv) /* PR binutils/13493: Support plugins. */ case OPTION_PLUGIN: #if BFD_SUPPORTS_PLUGINS - plugin_target = "plugin"; bfd_plugin_set_plugin (optarg); #else fprintf (stderr, _("sorry - this program has been built without plugin support\n")); |