This patch allows one to place the gcc's liblto_plugin in the lib/bfd-plugins directory
authorMarkus Trippelsdorf <markus@trippelsdorf.de>
Thu, 3 Apr 2014 10:33:17 +0000 (11:33 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 3 Apr 2014 10:33:17 +0000 (11:33 +0100)
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.

binutils/ChangeLog
binutils/ar.c
binutils/nm.c

index 8fc5f7f05c9d23ba974b91e9a2597d06068ac18c..931d9d080dcc1485fc13bc39cb270cbffd6fdd20 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-03  Markus Trippelsdorf  <markus@trippelsdorf.de>
+
+       PR binutils/14698
+       ar.c: Set plugin_target early if plugins are supported.
+       nm.c: Likewise.
+
 2014-04-03  Tristan Gingold  <gingold@adacore.com>
 
        * od-macho.c (printf_uint64): New function.
index 69f20f95c0f8ecc3cdb7cb61efb1fbbb24ad92b3..ebd9528b837fb0cbd4ffef9847395074e419ad4e 100644 (file)
@@ -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"));
index 15c48a3c5ff63e12bd04379568684dfcb6814b85..2a44a846004885f06f288af6c38fa42eddf5a7f2 100644 (file)
@@ -175,7 +175,11 @@ static char other_format[] = "%02x";
 static char desc_format[] = "%04x";
 
 static char *target = NULL;
-static char *plugin_target = NULL;
+#if BFD_SUPPORTS_PLUGINS
+static const char *plugin_target = "plugin";
+#else
+static const char *plugin_target = NULL;
+#endif
 
 /* Used to cache the line numbers for a BFD.  */
 static bfd *lineno_cache_bfd;
@@ -1646,7 +1650,6 @@ main (int argc, char **argv)
 
        case OPTION_PLUGIN:     /* --plugin */
 #if BFD_SUPPORTS_PLUGINS
-         plugin_target = "plugin";
          bfd_plugin_set_plugin (optarg);
 #else
          fatal (_("sorry - this program has been built without plugin support\n"));
This page took 0.027054 seconds and 4 git commands to generate.