diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-02 08:25:13 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-02 08:25:13 +0000 |
commit | 531b6659dbfd201037c841deae0c078a453b3454 (patch) | |
tree | f712d4f96a28d54acaaf9ed9aed36915007ec792 /lto-plugin | |
parent | ad41d5a7eab4ebeb289abaa5297b830c33488baf (diff) | |
download | linaro-gcc-531b6659dbfd201037c841deae0c078a453b3454.tar.gz linaro-gcc-531b6659dbfd201037c841deae0c078a453b3454.tar.bz2 linaro-gcc-531b6659dbfd201037c841deae0c078a453b3454.zip |
2014-04-02 Richard Biener <rguenther@suse.de>
* lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin
is set in COLLECT_GCC_OPTIONS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209011 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'lto-plugin')
-rw-r--r-- | lto-plugin/ChangeLog | 5 | ||||
-rw-r--r-- | lto-plugin/lto-plugin.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index 8dcbc08bb5c..de0db1db442 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,8 @@ +2014-04-02 Richard Biener <rguenther@suse.de> + + * lto-plugin.c (onload): Fail to load if -fno-use-linker-plugin + is set in COLLECT_GCC_OPTIONS. + 2014-03-28 Richard Biener <rguenther@suse.de> * lto-plugin.c (process_symtab): Handle EINTR and short reads. diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index 1432340b015..910e23cd609 100644 --- a/lto-plugin/lto-plugin.c +++ b/lto-plugin/lto-plugin.c @@ -1067,5 +1067,12 @@ onload (struct ld_plugin_tv *tv) "could not register the all_symbols_read callback"); } + /* Support -fno-use-linker-plugin by failing to load the plugin + for the case where it is auto-loaded by BFD. */ + char *collect_gcc_options = getenv ("COLLECT_GCC_OPTIONS"); + if (collect_gcc_options + && strstr (collect_gcc_options, "'-fno-use-linker-plugin'")) + return LDPS_ERR; + return LDPS_OK; } |