From patchwork Mon Jan 1 21:24:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83079 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 02F5F3858434 for ; Mon, 1 Jan 2024 21:25:32 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id BEB783858D1E for ; Mon, 1 Jan 2024 21:24:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEB783858D1E 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 BEB783858D1E 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=1704144300; cv=none; b=TAtHfEAXBG392x/tkzsizFPlrO28RmMhk0zvyGSuz8vTu0Y2eCq7TY6i2K+UgCRp0qSHiEVSiY3qY2IShsmYbKCsiu+8rgQbCvX6awhQZkugFTBf+4pP02SFDaWiui2UFGE5pnazl0cqdOHHRxeNzaubvxwMfkxPIrOEuxyxHGU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704144300; c=relaxed/simple; bh=HIrxUyWmvovDAUcnR3hp6lxuOUwtrLOovAt8LW8zcRI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Wq7AAFCNAHInQTvypRuoSWN3IKprZGbhCX5YHpz4mX9MHHvPRw6VuXWFOF3pvsnM/RHtemj9tzk9KPbYfrmMENnFCnwqfmS9aY7+mmKal1e13Rmzuo6cHt8wDhKbX6uoAkxmqQPD3hqEv9in3AIWIMODFvZ0Ch2qyGy1FAAkopc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 0DB2134027D; Mon, 1 Jan 2024 21:24:58 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed] sim: ppc: simplify filter_host.c logic Date: Mon, 1 Jan 2024 16:24:54 -0500 Message-ID: <20240101212454.28715-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 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 Switch this from a build-time generation to a static include. This makes the build rules a bit simpler, especially as we move them to Automake from hand-written makefiles. --- sim/ppc/Makefile.in | 8 +------- sim/ppc/filter_host.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 sim/ppc/filter_host.c diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 48adacc0971a..ee8fb0462eb5 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -613,20 +613,14 @@ tmp-igen: igen $(srcdir)/powerpc.igen $(srcdir)/altivec.igen $(srcdir)/e500.igen -n support.c -f support.c $(SILENCE) touch $@ -# NOTE: Some versions of make don't handle files created as side-effects -# uncomment the below if that is the case. - $(TARGETLIB): tmp-igen itable.h itable.c icache.h icache.c idecode.h idecode.c semantics.h semantics.c model.h model.c support.h support.c: tmp-igen igen: igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o $(ECHO_CCLD) $(LINK_FOR_BUILD) igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o -filter_host.c: filter_filename.c - $(ECHO_GEN) cat $(srcdir)/filter_filename.c > filter_host.c - filter_host.o: filter_host.c $(CONFIG_H) $(FILTER_FILENAME_H) - $(ECHO_CC) $(COMPILE_FOR_BUILD) -c filter_host.c + $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/filter_host.c table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H) $(ECHO_CC) $(COMPILE_FOR_BUILD) -c $(srcdir)/table.c diff --git a/sim/ppc/filter_host.c b/sim/ppc/filter_host.c new file mode 100644 index 000000000000..87d9bbc2e222 --- /dev/null +++ b/sim/ppc/filter_host.c @@ -0,0 +1,18 @@ +/* Shim to share files between build & host programs. + + Copyright (C) 2024 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 . */ + +#include "filter_filename.c"