GNU Binutils with patches for OS216
Revision | ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0 (tree) |
---|---|
Time | 2020-07-04 01:47:40 |
Author | Sebastian Huber <sebastian.huber@embe...> |
Commiter | Sebastian Huber |
sim/ppc: Fix linker error with -fno-common
GCC 10 enables -fno-common by default. This resulted in a multiple
definition linker error since global variables were declared and defined
in a header file:
sim/ppc
* ld-insn.h (last_model, last_model_data, last_model_function,
last_model_internal, last_model_macro, last_model_static):
Delete.
(max_model_fields_len, model_data, model_functions,
model_internal, model_macros, model_static, models): Declare, but do not
define.
* ld-insn.c (last_model, last_model_data, last_model_function,
last_model_internal, last_model_macro, last_model_static,
max_model_fields_len, model_data, model_functions,
model_internal, model_macros, model_static, models): Define.
@@ -1,3 +1,16 @@ | ||
1 | +2020-07-03 Sebastian Huber <sebastian.huber@embedded-brains.de> | |
2 | + | |
3 | + * ld-insn.h (last_model, last_model_data, last_model_function, | |
4 | + last_model_internal, last_model_macro, last_model_static): | |
5 | + Delete. | |
6 | + (max_model_fields_len, model_data, model_functions, | |
7 | + model_internal, model_macros, model_static, models): Declare, but do not | |
8 | + define. | |
9 | + * ld-insn.c (last_model, last_model_data, last_model_function, | |
10 | + last_model_internal, last_model_macro, last_model_static, | |
11 | + max_model_fields_len, model_data, model_functions, | |
12 | + model_internal, model_macros, model_static, models): Define. | |
13 | + | |
1 | 14 | 2020-03-12 Kamil Rytarowski <n54@gmx.com> |
2 | 15 | |
3 | 16 | * emul_netbsd.c (netbsd_signal_names): Sync with NetBSD 9.99.49. |
@@ -28,6 +28,24 @@ | ||
28 | 28 | |
29 | 29 | #include "igen.h" |
30 | 30 | |
31 | +static model *last_model; | |
32 | + | |
33 | +static insn *last_model_macro; | |
34 | +static insn *last_model_function; | |
35 | +static insn *last_model_internal; | |
36 | +static insn *last_model_static; | |
37 | +static insn *last_model_data; | |
38 | + | |
39 | +model *models; | |
40 | + | |
41 | +insn *model_macros; | |
42 | +insn *model_functions; | |
43 | +insn *model_internal; | |
44 | +insn *model_static; | |
45 | +insn *model_data; | |
46 | + | |
47 | +int max_model_fields_len; | |
48 | + | |
31 | 49 | static void |
32 | 50 | update_depth(insn_table *entry, |
33 | 51 | lf *file, |
@@ -200,25 +200,15 @@ extern insn_table *load_insn_table | ||
200 | 200 | table_include *includes, |
201 | 201 | cache_table **cache_rules); |
202 | 202 | |
203 | -model *models; | |
204 | -model *last_model; | |
203 | +extern model *models; | |
205 | 204 | |
206 | -insn *model_macros; | |
207 | -insn *last_model_macro; | |
205 | +extern insn *model_macros; | |
206 | +extern insn *model_functions; | |
207 | +extern insn *model_internal; | |
208 | +extern insn *model_static; | |
209 | +extern insn *model_data; | |
208 | 210 | |
209 | -insn *model_functions; | |
210 | -insn *last_model_function; | |
211 | - | |
212 | -insn *model_internal; | |
213 | -insn *last_model_internal; | |
214 | - | |
215 | -insn *model_static; | |
216 | -insn *last_model_static; | |
217 | - | |
218 | -insn *model_data; | |
219 | -insn *last_model_data; | |
220 | - | |
221 | -int max_model_fields_len; | |
211 | +extern int max_model_fields_len; | |
222 | 212 | |
223 | 213 | extern void insn_table_insert_insn |
224 | 214 | (insn_table *table, |