diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-25 15:29:02 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-25 15:29:02 +0000 |
commit | 0244bab5568bc6159a3e51c1f857997732b14771 (patch) | |
tree | 7457b3189091fc80da5fdb55ee22562c6722c4be /lto-plugin | |
parent | 5790abbc74a3439158a53e1f8ae6848111088ced (diff) | |
download | gcc-0244bab5568bc6159a3e51c1f857997732b14771.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169237 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'lto-plugin')
-rw-r--r-- | lto-plugin/ChangeLog | 7 | ||||
-rw-r--r-- | lto-plugin/lto-plugin.c | 10 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index 4b1200289ed..bda47ec471f 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,10 @@ +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 diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index 2f422a3dd70..64a0164da3c 100644 --- a/lto-plugin/lto-plugin.c +++ b/lto-plugin/lto-plugin.c @@ -152,6 +152,10 @@ static char debug; 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.) */ @@ -622,7 +626,8 @@ all_symbols_read_handler (void) 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++) @@ -998,6 +1003,9 @@ onload (struct ld_plugin_tv *tv) 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; } |