From patchwork Thu Nov 3 18:37:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 59857 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 0ACB93858428 for ; Thu, 3 Nov 2022 18:37:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0ACB93858428 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667500655; bh=HoR0ZjZWjctE5/kgMtnElnQg8/Tnli9JJTsPpGOakqk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=tnpMtMUohkClqDziL72oiD1hkaOkoSS+OLabxjSksNZUVPJqNDGuTBYzqCD3uJwM5 Uozi7aAuelWWEdhiwmy1Z9P4ouWOHi2vnlN/2cvDwzwC5Colnkdk1vHb14XYjJHAZt xi6hviXYfDjpIj9EJdwdEvOQtZim8b/Io2dMne0Q= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 4F66A3858D26 for ; Thu, 3 Nov 2022 18:37:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4F66A3858D26 Received: by smtp.gentoo.org (Postfix, from userid 559) id A02D5341242; Thu, 3 Nov 2022 18:37:05 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] sim: erc32: link sis to run program Date: Fri, 4 Nov 2022 01:37:02 +0700 Message-Id: <20221103183702.16032-1-vapier@gentoo.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Mike Frysinger via Gdb-patches From: Mike Frysinger Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" The erc32 sim does a lot itself, including handling of the CLI. It used to provide a run-compatible interface in the pre-nrun days, but it was dropped when the old run interface was punted. Since the old commit 465fb143c87076b6416a8d0d5dd79bb016060fe3 ("sim: make nrun the default run program"), the erc32 run & sis programs have been the same, and erc32 hasn't provide a real run-compatible interface. Simplify this by linking the two programs via ln/cp instead of running the linking phase twice to produce the same result. If/when we fix up the erc32 port to have a proper run interface, it should be easy to split these back apart into real programs. Note: the interf.o reference in here is a bit of a misdirect. Since that object is placed into libsim.a, it's never been linked into the programs since the linker ignores objects that aren't referenced, and only gdb uses those symbols. --- sim/erc32/Makefile.in | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sim/erc32/Makefile.in b/sim/erc32/Makefile.in index 41830aab726f..013b604be49a 100644 --- a/sim/erc32/Makefile.in +++ b/sim/erc32/Makefile.in @@ -34,13 +34,10 @@ SIM_EXTRA_CFLAGS += -DFAST_UART -I$(srcroot) ## COMMON_POST_CONFIG_FRAG -# `sis' doesn't need interf.o. -SIS_OFILES = exec.o erc32.o func.o help.o float.o - all: sis$(EXEEXT) -sis$(EXEEXT): sis.o $(SIS_OFILES) libsim.a $(LIBDEPS) - $(ECHO_CCLD) $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \ - sis.o $(SIS_OFILES) libsim.a $(EXTRA_LIBS) +sis$(EXEEXT): run$(EXEEXT) + $(SILENCE) rm -f $@ + $(ECHO_GEN) ln $< $@ 2>/dev/null || $(LN_S) $< $@ 2>/dev/null || cp -p $< $@ # Copy the files into directories where they will be run. install-sis: installdirs