aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v/d10v_sim.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-01-09 03:10:52 -0500
committerMike Frysinger <vapier@gentoo.org>2021-01-09 09:39:17 -0500
commit7eb99e5e27eebaf4a4acd469ad0856c0b35d80b3 (patch)
tree4ae7fa2d590cec9e63da42f6fe9070f79092b4bf /sim/d10v/d10v_sim.h
parentf074c07d8d4d36d2712117eace2e4db48d544291 (diff)
downloadgdb-7eb99e5e27eebaf4a4acd469ad0856c0b35d80b3.zip
gdb-7eb99e5e27eebaf4a4acd469ad0856c0b35d80b3.tar.gz
gdb-7eb99e5e27eebaf4a4acd469ad0856c0b35d80b3.tar.bz2
sim: cr16/d10v: move storage out of header
These ports declare their State variable in a header and then include multiple times. This causes linker errors with newer gcc due to the change in -fno-common behavior. Move the storage to a C file so we only have one instance of it in the final program.
Diffstat (limited to 'sim/d10v/d10v_sim.h')
-rw-r--r--sim/d10v/d10v_sim.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sim/d10v/d10v_sim.h b/sim/d10v/d10v_sim.h
index 86243c9..a3755bf 100644
--- a/sim/d10v/d10v_sim.h
+++ b/sim/d10v/d10v_sim.h
@@ -270,7 +270,9 @@ struct _state
enum _ins_type ins_type;
-} State;
+};
+
+extern struct _state State;
extern uint16 OP[4];