GCC with patches for OS216
修订版 | 9486636608eb9db2f223c120951d8b528a9ca4df (tree) |
---|---|
时间 | 2020-05-20 00:54:03 |
作者 | Giuliano Belinassi <giuliano.belinassi@usp....> |
Commiter | Giuliano Belinassi |
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.
@@ -1,5 +1,10 @@ | ||
1 | 1 | 2020-05-18 Giuliano Belinassi <giuliano.belinassi@usp.br> |
2 | 2 | |
3 | + * gcc.c (append_split_outputs): Truncate temp_obj vector for the | |
4 | + next compilation. | |
5 | + | |
6 | +2020-05-18 Giuliano Belinassi <giuliano.belinassi@usp.br> | |
7 | + | |
3 | 8 | * gcc.c (EMPTY_CMD): New macro. |
4 | 9 | (temp_object_files): New variable. |
5 | 10 | (get_path_to_ld): New function. |
@@ -3400,6 +3400,8 @@ static void append_split_outputs (extra_arg_storer *storer, | ||
3400 | 3400 | |
3401 | 3401 | additional_ld->prog = path_to_ld; |
3402 | 3402 | additional_ld->argv = argv; |
3403 | + | |
3404 | + temp_object_files.truncate (0); | |
3403 | 3405 | } |
3404 | 3406 | |
3405 | 3407 | additional_asm_files.release (); |
@@ -3829,7 +3831,6 @@ execute (void) | ||
3829 | 3831 | |
3830 | 3832 | if (!have_S) |
3831 | 3833 | append_split_outputs (&storer, &additional_ld, &commands, &n_commands); |
3832 | - | |
3833 | 3834 | |
3834 | 3835 | if (!wrapper_string) |
3835 | 3836 | { |