[3/5] sim: unify cgen maintainer settings

Message ID 20210619202721.10432-3-vapier@gentoo.org
State New
Headers show
Series
  • [1/5] sim: ppc: rename inline defines to match common code
Related show

Commit Message

Simon Marchi via Gdb-patches June 19, 2021, 8:27 p.m.
Move these options up to the common dir so we only test & export
them once across all ports.  It makes it available to targets that
aren't cgen-based, but those will just ignore the settings, so it
shouldn't be an issue.
---
 sim/Makefile.in         |  4 ++++
 sim/aclocal.m4          |  1 +
 sim/arch-subdir.mk.in   |  5 +++++
 sim/bpf/Makefile.in     |  5 -----
 sim/bpf/aclocal.m4      |  1 -
 sim/bpf/configure       | 38 -------------------------------------
 sim/bpf/configure.ac    |  1 -
 sim/configure           | 42 +++++++++++++++++++++++++++++++++++++++--
 sim/configure.ac        |  1 +
 sim/cris/Makefile.in    |  5 -----
 sim/cris/aclocal.m4     |  1 -
 sim/cris/configure      | 38 -------------------------------------
 sim/cris/configure.ac   |  1 -
 sim/frv/Makefile.in     |  5 -----
 sim/frv/aclocal.m4      |  1 -
 sim/frv/configure       | 38 -------------------------------------
 sim/frv/configure.ac    |  1 -
 sim/iq2000/Makefile.in  |  5 -----
 sim/iq2000/aclocal.m4   |  1 -
 sim/iq2000/configure    | 38 -------------------------------------
 sim/iq2000/configure.ac |  1 -
 sim/lm32/Makefile.in    |  5 -----
 sim/lm32/aclocal.m4     |  1 -
 sim/lm32/configure      | 38 -------------------------------------
 sim/lm32/configure.ac   |  1 -
 sim/m32r/Makefile.in    |  5 -----
 sim/m32r/aclocal.m4     |  1 -
 sim/m32r/configure      | 38 -------------------------------------
 sim/m32r/configure.ac   |  1 -
 sim/or1k/Makefile.in    |  5 -----
 sim/or1k/aclocal.m4     |  1 -
 sim/or1k/configure      | 38 -------------------------------------
 sim/or1k/configure.ac   |  1 -
 33 files changed, 51 insertions(+), 317 deletions(-)

-- 
2.31.1

Patch

diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
index a176cf97acf0..6922b9719f39 100644
--- a/sim/arch-subdir.mk.in
+++ b/sim/arch-subdir.mk.in
@@ -53,4 +53,9 @@  COMMON_LIBS = @LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WERROR_CFLAGS = @WERROR_CFLAGS@
 
+# cgen support, enable with --enable-cgen-maint
+CGEN_MAINT = ; @true
+# The following line is commented in or out depending upon --enable-cgen-maint.
+@CGEN_MAINT@CGEN_MAINT =
+
 sim_inline = @sim_inline@
diff --git a/sim/bpf/Makefile.in b/sim/bpf/Makefile.in
index d165febdd34b..c48c37837e6e 100644
--- a/sim/bpf/Makefile.in
+++ b/sim/bpf/Makefile.in
@@ -46,11 +46,6 @@  SIM_WERROR_CFLAGS =
 
 ## COMMON_POST_CONFIG_FRAG
 
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
 # BPF headers
 
 BPF_INCLUDE_DEPS = \
diff --git a/sim/bpf/configure.ac b/sim/bpf/configure.ac
index a4138c097a89..13516a0914e7 100644
--- a/sim/bpf/configure.ac
+++ b/sim/bpf/configure.ac
@@ -7,6 +7,5 @@  SIM_AC_COMMON
 SIM_AC_OPTION_BITSIZE([64])
 SIM_AC_OPTION_SCACHE(16384)
 SIM_AC_OPTION_DEFAULT_MODEL([bpf-def])
-SIM_AC_OPTION_CGEN_MAINT
 
 SIM_AC_OUTPUT
diff --git a/sim/configure.ac b/sim/configure.ac
index a3f02a78e9a7..9530268ddc59 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -118,6 +118,7 @@  dnl Standard (and optional) simulator options.
 dnl Eventually all simulators will support these.
 SIM_AC_OPTION_ALIGNMENT
 SIM_AC_OPTION_ASSERT
+SIM_AC_OPTION_CGEN_MAINT
 SIM_AC_OPTION_DEBUG
 SIM_AC_OPTION_ENDIAN
 SIM_AC_OPTION_ENVIRONMENT
diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in
index 0b4b8f5c530b..ef83ce818260 100644
--- a/sim/cris/Makefile.in
+++ b/sim/cris/Makefile.in
@@ -102,11 +102,6 @@  cris-clean:
 	-rm -f stamp-arch
 	-rm -f tmp-*
 
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
 # Useful when making CGEN-generated files manually, without --enable-cgen-maint.
 stamps: stamp-v10fmloop stamp-v32fmloop stamp-arch stamp-v10fcpu stamp-v32fcpu
 
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index d94eabb683a9..909c41653f18 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -9,6 +9,5 @@  SIM_AC_OPTION_HARDWARE(rv cris cris_900000xx)
 
 # The default model shouldn't matter as long as there's a BFD.
 SIM_AC_OPTION_DEFAULT_MODEL(crisv32)
-SIM_AC_OPTION_CGEN_MAINT
 
 SIM_AC_OUTPUT
diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in
index 5356add6f0ac..6fdd6e0f1be3 100644
--- a/sim/frv/Makefile.in
+++ b/sim/frv/Makefile.in
@@ -69,11 +69,6 @@  frv-clean:
 	rm -f tmp-*
 	rm -f stamp-arch stamp-cpu
 
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(srcdir)/../../cpu/frv.cpu
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all \
 	  archfile=$(srcdir)/../../cpu/frv.cpu \
diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac
index f652e269a3b8..a03b4f666426 100644
--- a/sim/frv/configure.ac
+++ b/sim/frv/configure.ac
@@ -6,7 +6,6 @@  SIM_AC_COMMON
 
 SIM_AC_OPTION_SCACHE(16384)
 SIM_AC_OPTION_DEFAULT_MODEL(fr500)
-SIM_AC_OPTION_CGEN_MAINT
 
 #
 # Enable making unknown traps dump out registers
diff --git a/sim/iq2000/Makefile.in b/sim/iq2000/Makefile.in
index f7a77c2eefd0..557db484b629 100644
--- a/sim/iq2000/Makefile.in
+++ b/sim/iq2000/Makefile.in
@@ -69,11 +69,6 @@  iq2000-clean:
 	rm -f tmp-*
 	rm -f stamp-arch stamp-cpu
 
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/iq2000.cpu Makefile
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=iq2000 \
 	  archfile=$(CPU_DIR)/iq2000.cpu \
diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac
index 92c10d2eb183..c43463394a43 100644
--- a/sim/iq2000/configure.ac
+++ b/sim/iq2000/configure.ac
@@ -6,6 +6,5 @@  SIM_AC_COMMON
 
 SIM_AC_OPTION_SCACHE(16384)
 SIM_AC_OPTION_DEFAULT_MODEL(iq2000)
-SIM_AC_OPTION_CGEN_MAINT
 
 SIM_AC_OUTPUT
diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in
index 29489bcf7e43..268882745c7e 100644
--- a/sim/lm32/Makefile.in
+++ b/sim/lm32/Makefile.in
@@ -48,11 +48,6 @@  lm32-clean:
 	rm -f stamp-arch stamp-cpu 
 	rm -f tmp-*
 
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
 stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/lm32.cpu
 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all \
 	  archfile=$(CPU_DIR)/lm32.cpu \
diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac
index 32bbd1b4ac1c..b277c963a87f 100644
--- a/sim/lm32/configure.ac
+++ b/sim/lm32/configure.ac
@@ -6,7 +6,6 @@  SIM_AC_COMMON
 
 SIM_AC_OPTION_SCACHE(16384)
 SIM_AC_OPTION_DEFAULT_MODEL(lm32)
-SIM_AC_OPTION_CGEN_MAINT
 SIM_AC_OPTION_HARDWARE(lm32cpu lm32timer lm32uart)
 
 SIM_AC_OUTPUT
diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in
index 272974572ecf..f8ccb97d77b0 100644
--- a/sim/m32r/Makefile.in
+++ b/sim/m32r/Makefile.in
@@ -108,11 +108,6 @@  m32r-clean:
 	rm -f stamp-arch stamp-cpu stamp-xcpu stamp-2cpu
 	rm -f tmp-*
 
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
 # NOTE: Generated source files are specified as full paths,
 # e.g. $(srcdir)/arch.c, because make may decide the files live
 # in objdir otherwise.
diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac
index 3146feee6408..2e6b415e4065 100644
--- a/sim/m32r/configure.ac
+++ b/sim/m32r/configure.ac
@@ -6,7 +6,6 @@  SIM_AC_COMMON
 
 SIM_AC_OPTION_SCACHE(16384)
 SIM_AC_OPTION_DEFAULT_MODEL(m32r/d)
-SIM_AC_OPTION_CGEN_MAINT
 
   case "${target_alias}" in
   m32r*-linux*)
diff --git a/sim/or1k/Makefile.in b/sim/or1k/Makefile.in
index c6083b0cd6ea..499b3508cef0 100644
--- a/sim/or1k/Makefile.in
+++ b/sim/or1k/Makefile.in
@@ -93,11 +93,6 @@  traps.o: traps.c $(SIM_MAIN_DEPS) eng.h
 or1k-clean:
 	rm -f mloop.c eng.h stamp-mloop
 
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
 stamps: stamp-arch stamp-cpu stamp-mloop
 
 # NOTE: Generated source files are specified as full paths,
diff --git a/sim/or1k/configure.ac b/sim/or1k/configure.ac
index 576574c2ded2..f77a7339d56a 100644
--- a/sim/or1k/configure.ac
+++ b/sim/or1k/configure.ac
@@ -7,6 +7,5 @@  SIM_AC_COMMON
 SIM_AC_OPTION_BITSIZE([32], [31], [32])
 SIM_AC_OPTION_SCACHE(16384)
 SIM_AC_OPTION_DEFAULT_MODEL([or1200])
-SIM_AC_OPTION_CGEN_MAINT
 
 SIM_AC_OUTPUT