[2/2] sim: drop arch-specific config.h

Message ID 20210615054634.1639-2-vapier@gentoo.org
State New
Headers show
Series
  • [1/2] sim: move dv-sockser define to CPPFLAGS
Related show

Commit Message

Eli Zaretskii via Gdb-patches June 15, 2021, 5:46 a.m.
All of the settings in here are handled by the common top-level
config.h, so drop the individual arch-config.h files entirely.

This will also help guarantee that we don't add any new arch
specific defines that would affect common code which will help
with the effort of unifying them.
---
 sim/aarch64/config.in         | 119 --------------------
 sim/aarch64/configure         | 203 +++++++---------------------------
 sim/arm/config.in             | 119 --------------------
 sim/arm/configure             | 203 +++++++---------------------------
 sim/avr/config.in             | 119 --------------------
 sim/avr/configure             | 203 +++++++---------------------------
 sim/bfin/config.in            | 119 --------------------
 sim/bfin/configure            | 203 +++++++---------------------------
 sim/bpf/Makefile.in           |   3 +-
 sim/bpf/config.in             | 119 --------------------
 sim/bpf/configure             | 203 +++++++---------------------------
 sim/common/Make-common.in     |   8 +-
 sim/common/defs.h             |  18 +--
 sim/cr16/config.in            | 119 --------------------
 sim/cr16/configure            | 203 +++++++---------------------------
 sim/cris/Makefile.in          |   2 +-
 sim/cris/config.in            | 119 --------------------
 sim/cris/configure            | 203 +++++++---------------------------
 sim/d10v/config.in            | 119 --------------------
 sim/d10v/configure            | 203 +++++++---------------------------
 sim/erc32/config.in           | 119 --------------------
 sim/erc32/configure           | 203 +++++++---------------------------
 sim/example-synacor/config.in | 119 --------------------
 sim/example-synacor/configure | 203 +++++++---------------------------
 sim/frv/config.in             | 119 --------------------
 sim/frv/configure             | 203 +++++++---------------------------
 sim/ft32/config.in            | 119 --------------------
 sim/ft32/configure            | 203 +++++++---------------------------
 sim/h8300/config.in           | 119 --------------------
 sim/h8300/configure           | 203 +++++++---------------------------
 sim/iq2000/config.in          | 119 --------------------
 sim/iq2000/configure          | 203 +++++++---------------------------
 sim/lm32/config.in            | 119 --------------------
 sim/lm32/configure            | 203 +++++++---------------------------
 sim/m32c/config.in            | 119 --------------------
 sim/m32c/configure            | 203 +++++++---------------------------
 sim/m32r/config.in            | 119 --------------------
 sim/m32r/configure            | 203 +++++++---------------------------
 sim/m4/sim_ac_common.m4       |   1 -
 sim/m68hc11/config.in         | 119 --------------------
 sim/m68hc11/configure         | 203 +++++++---------------------------
 sim/mcore/config.in           | 119 --------------------
 sim/mcore/configure           | 203 +++++++---------------------------
 sim/microblaze/config.in      | 119 --------------------
 sim/microblaze/configure      | 203 +++++++---------------------------
 sim/mips/config.in            | 119 --------------------
 sim/mips/configure            | 203 +++++++---------------------------
 sim/mn10300/config.in         | 119 --------------------
 sim/mn10300/configure         | 203 +++++++---------------------------
 sim/moxie/config.in           | 119 --------------------
 sim/moxie/configure           | 203 +++++++---------------------------
 sim/msp430/config.in          | 119 --------------------
 sim/msp430/configure          | 203 +++++++---------------------------
 sim/or1k/config.in            | 119 --------------------
 sim/or1k/configure            | 203 +++++++---------------------------
 sim/pru/config.in             | 119 --------------------
 sim/pru/configure             | 203 +++++++---------------------------
 sim/riscv/config.in           | 119 --------------------
 sim/riscv/configure           | 203 +++++++---------------------------
 sim/rl78/config.in            | 119 --------------------
 sim/rl78/configure            | 203 +++++++---------------------------
 sim/rx/config.in              | 119 --------------------
 sim/rx/configure              | 203 +++++++---------------------------
 sim/sh/config.in              | 119 --------------------
 sim/sh/configure              | 203 +++++++---------------------------
 sim/v850/config.in            | 119 --------------------
 sim/v850/configure            | 203 +++++++---------------------------
 67 files changed, 1308 insertions(+), 8706 deletions(-)
 delete mode 100644 sim/aarch64/config.in
 delete mode 100644 sim/arm/config.in
 delete mode 100644 sim/avr/config.in
 delete mode 100644 sim/bfin/config.in
 delete mode 100644 sim/bpf/config.in
 delete mode 100644 sim/cr16/config.in
 delete mode 100644 sim/cris/config.in
 delete mode 100644 sim/d10v/config.in
 delete mode 100644 sim/erc32/config.in
 delete mode 100644 sim/example-synacor/config.in
 delete mode 100644 sim/frv/config.in
 delete mode 100644 sim/ft32/config.in
 delete mode 100644 sim/h8300/config.in
 delete mode 100644 sim/iq2000/config.in
 delete mode 100644 sim/lm32/config.in
 delete mode 100644 sim/m32c/config.in
 delete mode 100644 sim/m32r/config.in
 delete mode 100644 sim/m68hc11/config.in
 delete mode 100644 sim/mcore/config.in
 delete mode 100644 sim/microblaze/config.in
 delete mode 100644 sim/mips/config.in
 delete mode 100644 sim/mn10300/config.in
 delete mode 100644 sim/moxie/config.in
 delete mode 100644 sim/msp430/config.in
 delete mode 100644 sim/or1k/config.in
 delete mode 100644 sim/pru/config.in
 delete mode 100644 sim/riscv/config.in
 delete mode 100644 sim/rl78/config.in
 delete mode 100644 sim/rx/config.in
 delete mode 100644 sim/sh/config.in
 delete mode 100644 sim/v850/config.in

-- 
2.31.1

Patch

diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 3dab9ca1fd14..53feb03dedbd 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -218,7 +218,7 @@  CGEN_INCLUDE_DEPS = \
 ## COMMON_POST_CONFIG_FRAG
 
 CONFIG_CFLAGS = \
-	@DEFS@ \
+	-DHAVE_CONFIG_H \
 	$(SIM_DEFAULT_MODEL) \
 	$(SIM_BITSIZE) \
 	$(SIM_ENDIAN) \
@@ -423,7 +423,6 @@  endif
 all_object_files = $(LIB_OBJS) $(SIM_RUN_OBJS)
 generated_files = \
 	$(SIM_EXTRA_DEPS) \
-	config.h \
 	hw-config.h \
 	modules.c \
 	targ-map.c \
@@ -552,7 +551,6 @@  mostlyclean clean: $(SIM_EXTRA_CLEAN)
 distclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN)
 	rm -f TAGS
 	rm -f Makefile config.cache config.log config.status .gdbinit
-	rm -f config.h stamp-h
 
 .c.o:
 	$(COMPILE) $<
@@ -567,10 +565,6 @@  Makefile: Makefile.in $(srccom)/Make-common.in config.status
 config.status: configure
 	$(SHELL) ./config.status --recheck
 
-config.h: stamp-h ; @true
-stamp-h: config.in config.status
-	CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
-
 .gdbinit: # config.status $(srccom)/gdbinit.in
 	CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status
 
diff --git a/sim/common/defs.h b/sim/common/defs.h
index 21ad2a44d3ba..8bf129943aed 100644
--- a/sim/common/defs.h
+++ b/sim/common/defs.h
@@ -34,23 +34,11 @@ 
 #undef PACKAGE_URL
 #undef PACKAGE_VERSION
 
-/* Include arch-specific sim's various configure tests.  */
-#include "config.h"
-
-#ifndef SIM_COMMON_BUILD
-
-/* Reset macros that our config.h will provide.  */
-#undef PACKAGE
-#undef PACKAGE_BUGREPORT
-#undef PACKAGE_NAME
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-#undef PACKAGE_URL
-#undef PACKAGE_VERSION
-
 /* Include common sim's various configure tests.  */
+#ifndef SIM_COMMON_BUILD
 #include "../config.h"
-
+#else
+#include "config.h"
 #endif
 
 #endif
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index e8385c2e7c1c..070baf305e9f 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -22,7 +22,6 @@  dnl See README-HACKING for more details.
 AC_DEFUN([SIM_AC_COMMON],
 [dnl
 SIM_AC_TOOLCHAIN
-AC_CONFIG_HEADERS([config.h:config.in])
 
 # Dependency checking.
 ZW_CREATE_DEPDIR