diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-05-19 12:54:03 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-05-19 12:54:03 -0300 |
commit | 9486636608eb9db2f223c120951d8b528a9ca4df (patch) | |
tree | 2d6751b8851ad7c11f192c1f5b5a07a00d224f38 /gcc | |
parent | ce9f7bcf247453211b4b06bd1ca2dd61c71944db (diff) | |
download | gcc-9486636608eb9db2f223c120951d8b528a9ca4df.zip gcc-9486636608eb9db2f223c120951d8b528a9ca4df.tar.gz gcc-9486636608eb9db2f223c120951d8b528a9ca4df.tar.bz2 |
Fix compilation with multiple -c
Previous commit had an issue when calling
gcc -c file1.c file2.c
the expected result would be one .o file for each .c file. Previously
we were merging the object files.
gcc/ChangeLog
2020-05-18 Giuliano Belinassi <giuliano.belinassi@usp.br>
* gcc.c (append_split_outputs): Truncate temp_obj vector for the
next compilation.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gcc.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 57c9c8f..abe36bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2020-05-18 Giuliano Belinassi <giuliano.belinassi@usp.br> + * gcc.c (append_split_outputs): Truncate temp_obj vector for the + next compilation. + +2020-05-18 Giuliano Belinassi <giuliano.belinassi@usp.br> + * gcc.c (EMPTY_CMD): New macro. (temp_object_files): New variable. (get_path_to_ld): New function. @@ -3400,6 +3400,8 @@ static void append_split_outputs (extra_arg_storer *storer, additional_ld->prog = path_to_ld; additional_ld->argv = argv; + + temp_object_files.truncate (0); } additional_asm_files.release (); @@ -3829,7 +3831,6 @@ execute (void) if (!have_S) append_split_outputs (&storer, &additional_ld, &commands, &n_commands); - if (!wrapper_string) { |