[PATCH/submitted,08/10] sim: ppc: drop custom config.h header

Message ID 20240102053639.28290-8-vapier@gentoo.org
State New
Headers
Series [PATCH/submitted,01/10] sim: ppc: move long long test to top-level |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Mike Frysinger Jan. 2, 2024, 5:36 a.m. UTC
  Now that everything has moved to the top-level, we can drop the
custom ppc config.h and reuse the common one.
---
 sim/ppc/Makefile.in  |  30 ++----
 sim/ppc/configure    | 216 ++++++++-----------------------------------
 sim/ppc/configure.ac |   6 +-
 sim/ppc/defs.h       |  53 -----------
 4 files changed, 50 insertions(+), 255 deletions(-)
 delete mode 100644 sim/ppc/defs.h
  

Patch

diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 9b0cd2cffe8b..71199fc72ede 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -70,6 +70,7 @@  MONITOR_CFLAGS = @sim_monitor@
 MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@
 SWITCH_CFLAGS = @sim_switch@
 CONFIG_CFLAGS = \
+  -DHAVE_CONFIG_H \
   $(SMP_CFLAGS) \
   $(XOR_ENDIAN_CFLAGS) \
   $(BITSIZE_CFLAGS) \
@@ -141,9 +142,6 @@  COMMON_SIM_INLINE_H = $(srcroot)/sim/common/sim-inline.h
 COMMON_SIM_SIGNAL_H = $(srcroot)/sim/common/sim-signal.h
 
 # Headers in sim/ppc.
-ACCONFIG_H = \
-	acconfig.h
-
 ALTIVEC_EXPRESSION_H = \
 	altivec_expression.h
 
@@ -152,7 +150,6 @@  ALTIVEC_REGISTERS_H = \
 
 BASICS_H = \
 	basics.h \
-	$(CONFIG_H) \
 	$(INLINE_H) \
 	$(SIM_CALLBACKS_H) \
 	$(DEBUG_H) \
@@ -293,8 +290,7 @@  LF_H = \
 	lf.h
 
 MISC_H = \
-	misc.h \
-	$(CONFIG_H)
+	misc.h
 
 MON_H = \
 	mon.h \
@@ -353,9 +349,6 @@  WORDS_H = \
 
 
 # Generated headers.
-CONFIG_H = \
-        config.h
-
 DEFINES_H = \
         defines.h
 
@@ -406,8 +399,7 @@  BUILT_SRC_WO_CONFIG = \
 	hw.h hw.c
 
 BUILT_SRC = \
-	$(BUILT_SRC_WO_CONFIG) \
-	config.h
+	$(BUILT_SRC_WO_CONFIG)
 
 LIB_INLINE_SRC = \
 	psim.c \
@@ -505,9 +497,9 @@  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)
+debug.o: debug.c $(BASICS_H)
 
-sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H)
+sim-endian.o: sim-endian.c $(BASICS_H) $(SIM_ENDIAN_N_H)
 
 os_emul.o: os_emul.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H) $(EMUL_GENERIC_H) $(EMUL_NETBSD_H) $(EMUL_UNIX_H) $(EMUL_CHIRP_H) $(EMUL_BUGAPI_H)
 emul_generic.o: emul_generic.c $(EMUL_GENERIC_H)
@@ -563,7 +555,7 @@  itable.o: itable.c $(ITABLE_H)
 
 mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H)
 
-sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H)
+sim-fpu.o: $(srcdir)/../common/sim-fpu.c
 	$(ECHO_CC) $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c 
 
 # Rebuild options whenever something changes so the date/time is up to date.
@@ -571,8 +563,8 @@  options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H)
 	$(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c
 
 defines.h: tmp-defines; @true
-tmp-defines: config.h Makefile
-	$(ECHO_GEN) sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h
+tmp-defines: Makefile
+	$(ECHO_GEN) sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < ../config.h > tmp-defines.h
 	$(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-defines.h defines.h
 	$(SILENCE) touch $@
 
@@ -693,7 +685,7 @@  clean mostlyclean:
 	rm -f tmp-* *.[oasi] core $(BUILT_SRC_WO_CONFIG)
 
 distclean realclean: clean
-	rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log
+	rm -f TAGS Makefile config.cache config.status defines.h stamp-h config.log
 
 maintainer-clean: distclean
 	rm -f *~ *.log core *.core
@@ -701,10 +693,6 @@  maintainer-clean: distclean
 Makefile: Makefile.in config.status
 	CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
 
-config.h: stamp-h ; @true
-stamp-h: config.in config.status
-	CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
-
 config.status: configure
 	$(SHELL) ./config.status --recheck
 
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index b19be90ec33b..6dfc533a085b 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -285,9 +285,6 @@  if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then
 fi],[sim_xor_endian=""])dnl
 
 
-AC_CONFIG_HEADER(config.h:config.in)
-
-
 AC_SUBST(sim_line_nr)
 AC_SUBST(sim_opcode)
 AC_SUBST(sim_switch)
@@ -309,5 +306,4 @@  AC_SUBST(sim_model)
 AC_SUBST(sim_default_model)
 AC_SUBST(sim_model_issue)
 
-AC_OUTPUT(Makefile,
-[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
+AC_OUTPUT(Makefile)
diff --git a/sim/ppc/defs.h b/sim/ppc/defs.h
deleted file mode 100644
index ab7a142b8994..000000000000
--- a/sim/ppc/defs.h
+++ /dev/null
@@ -1,53 +0,0 @@ 
-/* The configure generated header settings.
-
-   Copyright 2002-2023 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* This file should be included by every .c file before any other header.  */
-
-#ifndef DEFS_H
-#define DEFS_H
-
-/* Include gnulib's various configure tests.  */
-#include "gnulib/config.h"
-
-/* This comes from gnulib.  Export it until ansidecl.h handles it.  */
-#define ATTRIBUTE_FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH
-
-/* 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 arch-specific sim's various configure tests.  */
-#include "config.h"
-
-/* 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.  */
-#include "../config.h"
-
-#endif