aboutsummaryrefslogtreecommitdiff
path: root/sim/cris
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/cris
parentd47ea1b9c1fb6d57271697f186f7141ef4aa41c4 (diff)
downloadbinutils-3d0421178673d74a790637e31fed944bf48aa3aa.zip
binutils-3d0421178673d74a790637e31fed944bf48aa3aa.tar.gz
binutils-3d0421178673d74a790637e31fed944bf48aa3aa.tar.bz2
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/cris')
-rw-r--r--sim/cris/Makefile.in6
-rw-r--r--sim/cris/local.mk3
2 files changed, 5 insertions, 4 deletions
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 3474eb9..4242b17 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -19,6 +19,8 @@
## COMMON_PRE_CONFIG_FRAG
+arch = cris
+
CRISV10F_OBJS = crisv10f.o cpuv10.o decodev10.o modelv10.o mloopv10f.o
CRISV32F_OBJS = crisv32f.o cpuv32.o decodev32.o modelv32.o mloopv32f.o
@@ -31,14 +33,10 @@ SIM_OBJS = \
$(CRISV32F_OBJS) \
traps.o
-SIM_EXTRA_HW_DEVICES = rv cris cris_900000xx
-
SIM_EXTRA_CLEAN = cris-clean
## COMMON_POST_CONFIG_FRAG
-arch = cris
-
cris-clean:
-rm -f stamp-arch
-rm -f tmp-*
diff --git a/sim/cris/local.mk b/sim/cris/local.mk
index 0a3423c..826d6de 100644
--- a/sim/cris/local.mk
+++ b/sim/cris/local.mk
@@ -24,6 +24,9 @@
noinst_PROGRAMS += %D%/run
+%C%_SIM_EXTRA_HW_DEVICES = rv cris cris_900000xx
+AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
+
## rvdummy is just used for testing -- it runs on the same host as `run`.
## It does nothing if --enable-sim-hardware isn't active.
%C%_rvdummy_SOURCES = %D%/rvdummy.c