Ticket #3569: binutils-2.24-load-gcc-lto-plugin-by-default.patch

File binutils-2.24-load-gcc-lto-plugin-by-default.patch, 2.0 KB (added by Miklos Karacsony, 11 years ago)
  • binutils/ar.c

    Submitted By:            Miklos Karacsony <mkaracsony81 at gmail dot com>
    Date:                    2014-05-01
    Initial Package Version: 2.24
    Upstream Status:         Applied
    Origin:                  Upstream
    Description:             Load gcc LTO plugin by default
    
    diff --git a/binutils/ar.c b/binutils/ar.c
    index a11ed15c86bc..f0feaef5b233 100644
    a b static int show_version = 0;  
    138138
    139139static int show_help = 0;
    140140
     141#if BFD_SUPPORTS_PLUGINS
     142static const char *plugin_target = "plugin";
     143#else
    141144static const char *plugin_target = NULL;
     145#endif
    142146
    143147static const char *target = NULL;
    144148
    decode_options (int argc, char **argv)  
    571575          break;
    572576        case OPTION_PLUGIN:
    573577#if BFD_SUPPORTS_PLUGINS
    574           plugin_target = "plugin";
    575578          bfd_plugin_set_plugin (optarg);
    576579#else
    577580          fprintf (stderr, _("sorry - this program has been built without plugin support\n"));
    ranlib_main (int argc, char **argv)  
    632635          /* PR binutils/13493: Support plugins.  */
    633636        case OPTION_PLUGIN:
    634637#if BFD_SUPPORTS_PLUGINS
    635           plugin_target = "plugin";
    636638          bfd_plugin_set_plugin (optarg);
    637639#else
    638640          fprintf (stderr, _("sorry - this program has been built without plugin support\n"));
  • binutils/nm.c

    diff --git a/binutils/nm.c b/binutils/nm.c
    index 156194f21de7..876bbed7a407 100644
    a b static char other_format[] = "%02x";  
    177177static char desc_format[] = "%04x";
    178178
    179179static char *target = NULL;
    180 static char *plugin_target = NULL;
     180#if BFD_SUPPORTS_PLUGINS
     181static const char *plugin_target = "plugin";
     182#else
     183static const char *plugin_target = NULL;
     184#endif
    181185
    182186/* Used to cache the line numbers for a BFD.  */
    183187static bfd *lineno_cache_bfd;
    main (int argc, char **argv)  
    16481652
    16491653        case OPTION_PLUGIN:     /* --plugin */
    16501654#if BFD_SUPPORTS_PLUGINS
    1651           plugin_target = "plugin";
    16521655          bfd_plugin_set_plugin (optarg);
    16531656#else
    16541657          fatal (_("sorry - this program has been built without plugin support\n"));