From patchwork Tue Jan 2 05:36:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83111 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B72A13858294 for ; Tue, 2 Jan 2024 06:39:38 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 03D543858428 for ; Tue, 2 Jan 2024 06:36:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 03D543858428 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 03D543858428 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177419; cv=none; b=fh5KLnlQZTPfvtL8l9Ko5+M9pg8O2SQ3oZgZfpzEB7Y6L6oMBJaoeL2bpUkNs6BTtS94o29ej5U19z1PXCVSDlGa79l+G5CtAKK8UF+o2auIQhlHODBep8GoLP+Dgy30byCJFZpKMO9Nu+dRPtPVtOSOIGkP8QZJcdpoN+wviqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177419; c=relaxed/simple; bh=QsWHxKPWRrCcq2Yn1z2GmJo+BGyy/MgN6W67/TNb17A=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=IcqZKVU7bwJjLoT6jl62YofCyZ29VBD+BznSn6MWdcJ10QFfDsKViQAH4ZzNI490uZL+m/wEw+FL0UVIF2VFJdtN3f4wxQRUcjM7Spe635RziT5Bt2kxjxydGfxelW4mKEnmk4Xv11qTfD8xjNcvgwohxGQ1xUeaNQEf/rWkAOM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id A7630340813; Tue, 2 Jan 2024 06:36:56 +0000 (UTC) From: Mike Frysinger 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 Message-ID: <20240102053639.28290-8-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.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 . */ - -/* 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