public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/submitted 08/10] sim: ppc: drop custom config.h header
Date: Tue,  2 Jan 2024 00:36:36 -0500	[thread overview]
Message-ID: <20240102053639.28290-8-vapier@gentoo.org> (raw)
In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org>

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

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
-- 
2.43.0


  parent reply	other threads:[~2024-01-02  6:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02  5:36 [PATCH/submitted 01/10] sim: ppc: move long long test to top-level Mike Frysinger
2024-01-02  5:36 ` [PATCH/submitted 02/10] sim: ppc: move struct statfs " Mike Frysinger
2024-01-02  5:36 ` [PATCH/submitted 03/10] sim: ppc: move termio defines to config.h Mike Frysinger
2024-01-02  5:36 ` [PATCH/submitted 04/10] sim: ppc: switch struct member checks to AC_CHECK_MEMBER Mike Frysinger
2024-01-02  5:36 ` [PATCH/submitted 05/10] sim: ppc: switch to AC_CACHE_CHECK Mike Frysinger
2024-01-02  5:36 ` [PATCH/submitted 06/10] sim: ppc: move termios probes to top-level Mike Frysinger
2024-01-02  5:36 ` [PATCH/submitted 07/10] sim: ppc: stop including headers from gdb/ Mike Frysinger
2024-01-02  5:36 ` Mike Frysinger [this message]
2024-01-02  5:36 ` [PATCH/submitted 09/10] sim: ppc: drop configure compiler checks Mike Frysinger
2024-01-02  5:36 ` [PATCH/submitted 10/10] sim: ppc: move defines.h generation to the top-level Mike Frysinger
2024-01-09 14:33 ` [PATCH/submitted 01/10] sim: ppc: move long long test to top-level Tom Tromey
2024-01-09 17:50   ` Mike Frysinger
2024-01-09 19:05     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102053639.28290-8-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).