• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisionad8464f799a4c96c7ab8bdfec3f95846cf54f9b0 (tree)
Time2020-07-04 01:47:40
AuthorSebastian Huber <sebastian.huber@embe...>
CommiterSebastian Huber

Log Message

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:

ld: ld-insn.o:sim/ppc/ld-insn.h:221: multiple definition of
max_model_fields_len'; igen.o:sim/ppc/ld-insn.h:221: first defined here

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.

Change Summary

Incremental Difference

--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -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+
114 2020-03-12 Kamil Rytarowski <n54@gmx.com>
215
316 * emul_netbsd.c (netbsd_signal_names): Sync with NetBSD 9.99.49.
--- a/sim/ppc/ld-insn.c
+++ b/sim/ppc/ld-insn.c
@@ -28,6 +28,24 @@
2828
2929 #include "igen.h"
3030
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+
3149 static void
3250 update_depth(insn_table *entry,
3351 lf *file,
--- a/sim/ppc/ld-insn.h
+++ b/sim/ppc/ld-insn.h
@@ -200,25 +200,15 @@ extern insn_table *load_insn_table
200200 table_include *includes,
201201 cache_table **cache_rules);
202202
203-model *models;
204-model *last_model;
203+extern model *models;
205204
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;
208210
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;
222212
223213 extern void insn_table_insert_insn
224214 (insn_table *table,