public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: ppc: drop support for std-config.h overrides
@ 2021-09-09  6:47 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-09-09  6:47 UTC (permalink / raw)
  To: gdb-patches

Only the ppc arch supports this kind of source file override logic.
All the others expose knobs via configure flags, and for some of
these, the ppc code does as well.  For others, it doesn't make sense
to ever change them.  Since it's unlikely anyone is using this, drop
it all to simplify the code (and to get us a little closer to the
common sim code).
---
 sim/ppc/Makefile.in  | 18 ++++--------------
 sim/ppc/basics.h     |  2 +-
 sim/ppc/configure    | 28 ----------------------------
 sim/ppc/configure.ac | 22 ----------------------
 sim/ppc/inline.c     |  2 +-
 5 files changed, 6 insertions(+), 66 deletions(-)

diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 397e76cbe1e1..9d892ee5999f 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -95,7 +95,6 @@ LIBS = $(COMMON_LIBS) @LIBS@ $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS)
 LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
 
-CONFIG_FILE = @sim_config@
 IGEN_OPCODE_RULES = @sim_opcode@
 IGEN_DECODE_MECHANISM = @sim_decode_mechanism@
 IGEN_DUPLICATE = @sim_dup@
@@ -168,7 +167,6 @@ ALTIVEC_REGISTERS_H = \
 BASICS_H = \
 	basics.h \
 	$(CONFIG_H) \
-	$(PPC_CONFIG_H) \
 	$(INLINE_H) \
 	$(SIM_CALLBACKS_H) \
 	$(DEBUG_H) \
@@ -401,9 +399,6 @@ MODEL_H = \
 PK_H = \
         pk.h
 
-PPC_CONFIG_H = \
-        ppc-config.h
-
 SEMANTICS_H = \
         semantics.h
 
@@ -437,8 +432,7 @@ BUILT_SRC_WO_CONFIG = \
 
 BUILT_SRC = \
 	$(BUILT_SRC_WO_CONFIG) \
-	config.h \
-	ppc-config.h 
+	config.h
 
 LIB_INLINE_SRC = \
 	psim.c \
@@ -541,7 +535,7 @@ psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H)
 bits.o: bits.c $(BASICS_H)
 
 debug.o: debug.c $(CONFIG_H) $(BASICS_H)
-filter_filename.o: filter_filename.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
+filter_filename.o: filter_filename.c $(CONFIG_H) $(FILTER_FILENAME_H)
 
 sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H)
 
@@ -646,10 +640,6 @@ tmp-defines: config.h Makefile
 # Rules to create the built c source code files
 #
 
-ppc-config.h: $(CONFIG_FILE)
-	cp $(srcdir)/$(CONFIG_FILE) ppc-config.h
-
-
 tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change
 	$(DGEN) $(DGEN_FLAGS) \
 		-r $(srcdir)/ppc-spr-table \
@@ -705,7 +695,7 @@ igen: igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o l
 filter_host.c: filter_filename.c
 	cat $(srcdir)/filter_filename.c > filter_host.c
 
-filter_host.o: filter_host.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
+filter_host.o: filter_host.c $(CONFIG_H) $(FILTER_FILENAME_H)
 	$(COMPILE_FOR_BUILD) -c filter_host.c
 
 table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
@@ -856,7 +846,7 @@ distclean realclean: clean
 	rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
 
 maintainer-clean: distclean
-	rm -f *~ *.log ppc-config.h core *.core
+	rm -f *~ *.log core *.core
 
 Makefile: Makefile.in config.status
 	CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/sim/ppc/basics.h b/sim/ppc/basics.h
index 0d03a42d8b75..7c54b734d936 100644
--- a/sim/ppc/basics.h
+++ b/sim/ppc/basics.h
@@ -71,7 +71,7 @@ typedef enum {
 
 /* Basic configuration */
 
-#include "ppc-config.h"
+#include "std-config.h"
 #include "inline.h"
 
 
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index e264c8763865..b837c5b8609e 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -16,27 +16,6 @@ if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
 fi],[sim_bitsize=""])dnl
 
 
-AC_ARG_ENABLE(sim-config,
-[  --enable-sim-config=file		Override default config file],
-[case "${enableval}" in
-  yes|no)	AC_MSG_ERROR("No value supplied for --enable-sim-config=file");;
-  *)		if test -f "${srcdir}/${enableval}"; then
-		  sim_config="${enableval}";
-		elif test -f "${srcdir}/${enableval}-config.h"; then
-		  sim_config="${enableval}-config.h"
-		else
-		  AC_MSG_ERROR("Config file $enableval was not found");
-		  sim_config=std-config.h
-		fi;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_config" != x""; then
-  echo "Setting config flags = $sim_config" 6>&1
-fi],[sim_config="std-config.h"
-if test x"$silent" != x"yes"; then
-  echo "Setting config flags = $sim_config" 6>&1
-fi])dnl
-
-
 AC_ARG_ENABLE(sim-decode-mechanism,
 [  --enable-sim-decode-mechanism=which		Specify the instruction decode mechanism.],
 [case "${enableval}" in
@@ -621,7 +600,6 @@ else
 fi
 
 AC_SUBST(sim_line_nr)
-AC_SUBST(sim_config)
 AC_SUBST(sim_opcode)
 AC_SUBST(sim_switch)
 AC_SUBST(sim_dup)
diff --git a/sim/ppc/inline.c b/sim/ppc/inline.c
index 1db2dec5c30c..dfba2b31348a 100644
--- a/sim/ppc/inline.c
+++ b/sim/ppc/inline.c
@@ -24,7 +24,7 @@
 /* This must come before any other includes.  */
 #include "defs.h"
 
-#include "ppc-config.h"
+#include "std-config.h"
 
 #include "inline.h"
 
-- 
2.33.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-09  6:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09  6:47 [PATCH] sim: ppc: drop support for std-config.h overrides Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).