aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-05-07 15:53:40 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-05-07 15:53:40 +0000
commit5cd0e96b0e8248436fa6f743feb057114abd2f62 (patch)
tree29dabebed4129e0cb07c2120a2171cf6005fa4b9 /gcc/gcc.c
parent40bb78ad246919ee068382c3a2cdf6f299e412c9 (diff)
downloadgcc-5cd0e96b0e8248436fa6f743feb057114abd2f62.zip
gcc-5cd0e96b0e8248436fa6f743feb057114abd2f62.tar.gz
gcc-5cd0e96b0e8248436fa6f743feb057114abd2f62.tar.bz2
re PR lto/43857 (-fresolution causes an ICE)
2010-05-07 Richard Guenther <rguenther@suse.de> * gcc.c (LINK_COMMAND_SPEC): Provide a resolution file to the linker plugin. (store_arg): Queue temp_filename for deletion instead of the whole argument. lto/ PR lto/43857 PR lto/43371 * lang.opt (fresolution): Change to ... (fresolution=): ... this. * lto-lang.c (lto_handle_option): Adjust. lto-plugin/ * lto-plugin.c (free_2): Do not free resolution_file. (write_resolution): Check that we were passed a resolution file. (all_symbols_read_handler): Adjust. (cleanup_handler): Do not remove the resolution file. (process_option): Handle -fresolution=. From-SVN: r159159
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index a25077e..7e4343d 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -782,6 +782,7 @@ proper position among the other output files. */
-plugin %(linker_plugin_file) \
-plugin-opt=%(lto_wrapper) \
-plugin-opt=%(lto_gcc) \
+ -plugin-opt=-fresolution=%u.res \
%{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} \
%{static:-plugin-opt=-pass-through=-lc} \
%{O*:-plugin-opt=-O%*} \
@@ -2044,6 +2045,23 @@ static int signal_count;
/* Name with which this program was invoked. */
static const char *programname;
+
+/* This is the common prefix we use to make temp file names.
+ It is chosen once for each run of this program.
+ It is substituted into a spec by %g or %j.
+ Thus, all temp file names contain this prefix.
+ In practice, all temp file names start with this prefix.
+
+ This prefix comes from the envvar TMPDIR if it is defined;
+ otherwise, from the P_tmpdir macro if that is defined;
+ otherwise, in /usr/tmp or /tmp;
+ or finally the current directory if all else fails. */
+
+static const char *temp_filename;
+
+/* Length of the prefix. */
+
+static int temp_filename_length;
/* Allocate the argument vector. */
@@ -2081,7 +2099,7 @@ store_arg (const char *arg, int delete_always, int delete_failure)
if (strcmp (arg, "-o") == 0)
have_o_argbuf_index = argbuf_index;
if (delete_always || delete_failure)
- record_temp_file (arg, delete_always, delete_failure);
+ record_temp_file (temp_filename, delete_always, delete_failure);
}
/* Load specs from a file name named FILENAME, replacing occurrences of
@@ -2384,23 +2402,6 @@ read_specs (const char *filename, int main_p)
/* Record the names of temporary files we tell compilers to write,
and delete them at the end of the run. */
-/* This is the common prefix we use to make temp file names.
- It is chosen once for each run of this program.
- It is substituted into a spec by %g or %j.
- Thus, all temp file names contain this prefix.
- In practice, all temp file names start with this prefix.
-
- This prefix comes from the envvar TMPDIR if it is defined;
- otherwise, from the P_tmpdir macro if that is defined;
- otherwise, in /usr/tmp or /tmp;
- or finally the current directory if all else fails. */
-
-static const char *temp_filename;
-
-/* Length of the prefix. */
-
-static int temp_filename_length;
-
/* Define the list of temporary files to delete. */
struct temp_file