+2011-01-25 Ian Lance Taylor <iant@google.com>
+
+ * lto-plugin.c (gold_version): New static variable.
+ (all_symbols_read_handler): Don't check pass_through_items if
+ using gold 1.11 or later.
+ (onload): Set gold_version if we see LDPT_GOLD_VERSION.
+
2011-01-12 Richard Guenther <rguenther@suse.de>
PR lto/47264
static char nop;
static char *resolution_file = NULL;
+/* The version of gold being used, or -1 if not gold. The number is
+ MAJOR * 100 + MINOR. */
+static int gold_version = -1;
+
/* Not used by default, but can be overridden at runtime
by using -plugin-opt=-sym-style={none,win32,underscore|uscore}
(in fact, only first letter of style arg is checked.) */
free (lto_argv);
- if (pass_through_items)
+ /* --pass-through is not needed when using gold 1.11 or later. */
+ if (pass_through_items && gold_version < 111)
{
unsigned int i;
for (i = 0; i < num_pass_through_items; i++)
case LDPT_OPTION:
process_option (p->tv_u.tv_string);
break;
+ case LDPT_GOLD_VERSION:
+ gold_version = p->tv_u.tv_val;
+ break;
default:
break;
}