summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-06 21:40:56 +0700
committerMike Frysinger <vapier@gentoo.org>2022-11-11 01:44:16 +0700
commit6f9208a40f8a6ca603ed4fec78813d490811f2a8 (patch)
tree40e0bedf274d0a99cf8d31d2d9a42def82392440
parent7f19eb0786d768058349654028d942e806386246 (diff)
downloadbinutils-gdb-6f9208a40f8a6ca603ed4fec78813d490811f2a8.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.
-rw-r--r--sim/bfin/Makefile.in35
-rw-r--r--sim/bfin/local.mk34
-rw-r--r--sim/common/Make-common.in2
-rw-r--r--sim/cris/Makefile.in6
-rw-r--r--sim/cris/local.mk3
-rw-r--r--sim/lm32/Makefile.in6
-rw-r--r--sim/lm32/local.mk3
-rw-r--r--sim/m32r/Makefile.in6
-rw-r--r--sim/m32r/local.mk3
-rw-r--r--sim/m68hc11/Makefile.in4
-rw-r--r--sim/m68hc11/local.mk3
-rw-r--r--sim/mips/Makefile.in4
-rw-r--r--sim/mips/local.mk3
-rw-r--r--sim/mn10300/Makefile.in4
-rw-r--r--sim/mn10300/local.mk3
15 files changed, 67 insertions, 52 deletions
diff --git a/sim/bfin/Makefile.in b/sim/bfin/Makefile.in
index 0655a06d5f2..5d8a8a6386c 100644
--- a/sim/bfin/Makefile.in
+++ b/sim/bfin/Makefile.in
@@ -17,6 +17,8 @@
## COMMON_PRE_CONFIG_FRAG
+arch = bfin
+
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
bfin-sim.o \
@@ -26,39 +28,6 @@ SIM_OBJS = \
machs.o \
sim-resume.o
-SIM_EXTRA_HW_DEVICES = \
- bfin_cec \
- bfin_ctimer \
- bfin_dma \
- bfin_dmac \
- bfin_ebiu_amc \
- bfin_ebiu_ddrc \
- bfin_ebiu_sdc \
- bfin_emac \
- bfin_eppi \
- bfin_evt \
- bfin_gpio \
- bfin_gpio2 \
- bfin_gptimer \
- bfin_jtag \
- bfin_mmu \
- bfin_nfc \
- bfin_otp \
- bfin_pfmon \
- bfin_pint \
- bfin_pll \
- bfin_ppi \
- bfin_rtc \
- bfin_sic \
- bfin_spi \
- bfin_trace \
- bfin_twi \
- bfin_uart \
- bfin_uart2 \
- bfin_wdog \
- bfin_wp \
- eth_phy
-
SIM_EXTRA_CFLAGS = $(SDL_CFLAGS)
## COMMON_POST_CONFIG_FRAG
diff --git a/sim/bfin/local.mk b/sim/bfin/local.mk
index 956b3aec30d..cab9e796698 100644
--- a/sim/bfin/local.mk
+++ b/sim/bfin/local.mk
@@ -24,6 +24,40 @@
noinst_PROGRAMS += %D%/run
+%C%_SIM_EXTRA_HW_DEVICES = \
+ bfin_cec \
+ bfin_ctimer \
+ bfin_dma \
+ bfin_dmac \
+ bfin_ebiu_amc \
+ bfin_ebiu_ddrc \
+ bfin_ebiu_sdc \
+ bfin_emac \
+ bfin_eppi \
+ bfin_evt \
+ bfin_gpio \
+ bfin_gpio2 \
+ bfin_gptimer \
+ bfin_jtag \
+ bfin_mmu \
+ bfin_nfc \
+ bfin_otp \
+ bfin_pfmon \
+ bfin_pint \
+ bfin_pll \
+ bfin_ppi \
+ bfin_rtc \
+ bfin_sic \
+ bfin_spi \
+ bfin_trace \
+ bfin_twi \
+ bfin_uart \
+ bfin_uart2 \
+ bfin_wdog \
+ bfin_wp \
+ eth_phy
+AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
+
%D%/linux-fixed-code.h: @MAINT@ $(srcdir)/%D%/linux-fixed-code.s %D%/local.mk %D%/$(am__dirstamp)
$(AM_V_GEN)$(AS_FOR_TARGET_BFIN) $(srcdir)/%D%/linux-fixed-code.s -o %D%/linux-fixed-code.o
$(AM_V_at)(\
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 684d7d847ab..ff4e1710202 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -136,7 +136,7 @@ BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH)
COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS)
-SIM_HW_DEVICES = $(SIM_HW_DEVICES_) $(SIM_EXTRA_HW_DEVICES)
+SIM_HW_DEVICES = $(SIM_HW_DEVICES_) $($(arch)_SIM_EXTRA_HW_DEVICES)
SIM_NEW_COMMON_OBJS = $(SIM_NEW_COMMON_OBJS_) $(SIM_HW_OBJS)
LIBIBERTY_LIB = ../../libiberty/libiberty.a
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 3474eb9a827..4242b17c756 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 0a3423c3389..826d6de0be4 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
diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in
index 5d78e36bf6b..ea6601fab06 100644
--- a/sim/lm32/Makefile.in
+++ b/sim/lm32/Makefile.in
@@ -3,6 +3,8 @@
## COMMON_PRE_CONFIG_FRAG
+arch = lm32
+
# List of object files, less common parts.
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
@@ -12,14 +14,10 @@ SIM_OBJS = \
cpu.o decode.o sem.o model.o mloop.o \
lm32.o traps.o user.o
-SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart
-
SIM_EXTRA_CLEAN = lm32-clean
## COMMON_POST_CONFIG_FRAG
-arch = lm32
-
lm32-clean:
rm -f stamp-arch stamp-cpu
rm -f tmp-*
diff --git a/sim/lm32/local.mk b/sim/lm32/local.mk
index 7add85ac98b..437ec094e9c 100644
--- a/sim/lm32/local.mk
+++ b/sim/lm32/local.mk
@@ -24,6 +24,9 @@
noinst_PROGRAMS += %D%/run
+%C%_SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart
+AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
+
%C%_BUILD_OUTPUTS = \
%D%/eng.h \
%D%/mloop.c \
diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in
index 6a0e2e5fcf5..97afd6e03a3 100644
--- a/sim/m32r/Makefile.in
+++ b/sim/m32r/Makefile.in
@@ -19,6 +19,8 @@
## COMMON_PRE_CONFIG_FRAG
+arch = m32r
+
M32R_OBJS = m32r.o cpu.o decode.o sem.o model.o mloop.o
M32RX_OBJS = m32rx.o cpux.o decodex.o modelx.o mloopx.o
M32R2_OBJS = m32r2.o cpu2.o decode2.o model2.o mloop2.o
@@ -33,8 +35,6 @@ SIM_OBJS = \
$(M32R2_OBJS) \
traps.o
-SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart
-
SIM_EXTRA_CLEAN = m32r-clean
# Some modules don't build cleanly yet.
@@ -42,8 +42,6 @@ cpu.o cpu2.o cpux.o m32r.o m32r2.o m32rx.o mloop.o mloop2.o mloopx.o sem.o sim-i
## COMMON_POST_CONFIG_FRAG
-arch = m32r
-
m32r-clean:
rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu
rm -f tmp-*
diff --git a/sim/m32r/local.mk b/sim/m32r/local.mk
index 51d9d3413d6..dff09fbf15c 100644
--- a/sim/m32r/local.mk
+++ b/sim/m32r/local.mk
@@ -24,6 +24,9 @@
noinst_PROGRAMS += %D%/run
+%C%_SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart
+AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
+
%C%_BUILD_OUTPUTS = \
%D%/eng.h \
%D%/mloop.c \
diff --git a/sim/m68hc11/Makefile.in b/sim/m68hc11/Makefile.in
index 6b7fcfffb18..c16f5fce285 100644
--- a/sim/m68hc11/Makefile.in
+++ b/sim/m68hc11/Makefile.in
@@ -17,6 +17,8 @@
## COMMON_PRE_CONFIG_FRAG
+arch = m68hc11
+
M68HC11_OBJS = interp.o m68hc11int.o m68hc12int.o \
emulos.o interrupts.o m68hc11_sim.o
@@ -24,8 +26,6 @@ SIM_OBJS = $(M68HC11_OBJS) \
$(SIM_NEW_COMMON_OBJS) \
sim-resume.o
-SIM_EXTRA_HW_DEVICES = m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram
-
# We must use 32-bit addresses to support memory bank switching.
# The WORD_BITSIZE is normally 16 but must be switched (temporarily)
# to 32 to avoid a bug in the sim-common which uses 'unsigned_word'
diff --git a/sim/m68hc11/local.mk b/sim/m68hc11/local.mk
index 3cc980bf036..35555ed9868 100644
--- a/sim/m68hc11/local.mk
+++ b/sim/m68hc11/local.mk
@@ -24,6 +24,9 @@
noinst_PROGRAMS += %D%/run
+%C%_SIM_EXTRA_HW_DEVICES = m68hc11 m68hc11sio m68hc11eepr m68hc11tim m68hc11spi nvram
+AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
+
%C%_BUILD_OUTPUTS = \
%D%/gencode$(EXEEXT) \
%D%/m68hc11int.c \
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)"
diff --git a/sim/mn10300/Makefile.in b/sim/mn10300/Makefile.in
index 521f86c644b..0b3ebd5b74e 100644
--- a/sim/mn10300/Makefile.in
+++ b/sim/mn10300/Makefile.in
@@ -17,6 +17,8 @@
## COMMON_PRE_CONFIG_FRAG
+arch = mn10300
+
MN10300_OBJS = \
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
$(SIM_NEW_COMMON_OBJS) \
@@ -25,8 +27,6 @@ MN10300_OBJS = \
SIM_OBJS = $(MN10300_OBJS) interp.o
-SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop
-
# List of extra flags to always pass to $(CC).
SIM_EXTRA_CFLAGS = \
-DPOLL_QUIT_INTERVAL=0x20 \
diff --git a/sim/mn10300/local.mk b/sim/mn10300/local.mk
index 08a3d4dedc4..70b442fe1a0 100644
--- a/sim/mn10300/local.mk
+++ b/sim/mn10300/local.mk
@@ -24,6 +24,9 @@
noinst_PROGRAMS += %D%/run
+%C%_SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop
+AM_MAKEFLAGS += %C%_SIM_EXTRA_HW_DEVICES="$(%C%_SIM_EXTRA_HW_DEVICES)"
+
%C%_BUILT_SRC_FROM_IGEN = \
%D%/icache.h \
%D%/icache.c \