summaryrefslogtreecommitdiff
path: root/sim/mips
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-06 21:40:56 +0700
committerMike Frysinger <vapier@gentoo.org>2022-12-21 22:21:25 -0500
commit3d0421178673d74a790637e31fed944bf48aa3aa (patch)
tree39439636af47f282ad5ce4f71414ba369ab5e44b /sim/mips
parentd47ea1b9c1fb6d57271697f186f7141ef4aa41c4 (diff)
downloadbinutils-gdb-3d0421178673d74a790637e31fed944bf48aa3aa.tar.gz
sim: build: hoist lists of hw devices up
We need these in the top-level to generate libsim.a, but also in the subdirs to generate hw-config.h. Move it to the local.mk, and pass it down when running recursive make. This avoids duplication, and makes it available to both. We can simplify this once we move the various steps up to the top-level too.
Diffstat (limited to 'sim/mips')
-rw-r--r--sim/mips/Makefile.in4
-rw-r--r--sim/mips/local.mk3
2 files changed, 5 insertions, 2 deletions
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index 75438be5a18..eadb34697c8 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -3,6 +3,8 @@
## COMMON_PRE_CONFIG_FRAG
+arch = mips
+
# Object files created by various simulator generators.
@@ -64,8 +66,6 @@ SIM_OBJS = \
sim-main.o \
sim-resume.o \
-SIM_EXTRA_HW_DEVICES = tx3904cpu tx3904irc tx3904tmr tx3904sio
-
# List of flags to always pass to $(CC).
SIM_SUBTARGET=@SIM_SUBTARGET@
SIM_EXTRA_CFLAGS = $(SIM_SUBTARGET)
diff --git a/sim/mips/local.mk b/sim/mips/local.mk
index 8e266e77b36..159fd2947d4 100644
--- a/sim/mips/local.mk
+++ b/sim/mips/local.mk
@@ -23,3 +23,6 @@
$(SIM_COMMON_LIBS)
noinst_PROGRAMS += %D%/run
+
+%C%_SIM_EXTRA_HW_DEVICES = tx3904cpu tx3904irc tx3904tmr tx3904sio
+AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"