From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 8D14F385841E; Thu, 3 Nov 2022 18:37:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D14F385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667500632; bh=74dQNqqTjdZyMSy4DmdPSy4+5NEdX9YQPLh5d1Lkob8=; h=From:To:Subject:Date:From; b=CER/H2ntBer+3grWJMQGyDRtk8VD2e6GYIue+iS3Ld7Tmv2wPfmRPCEy4vMRQ1sxj C2kssofz7gg+R7lrvmiE4zuiFZLvaPhPZKIgD4hdArlpii4O0H3Lm9fMuZk1A9Ode9 +Zlip303zNySmspEo+6oF9LOHFhCz1kyzIIW+04k= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: erc32: link sis to run program X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: e26943f9c7285a453c5daf10ed078b2a014977c6 X-Git-Newrev: fa71c76d475f40cc583fb496d262c7bfa5a040fe Message-Id: <20221103183712.8D14F385841E@sourceware.org> Date: Thu, 3 Nov 2022 18:37:12 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dfa71c76d475f= 40cc583fb496d262c7bfa5a040fe commit fa71c76d475f40cc583fb496d262c7bfa5a040fe Author: Mike Frysinger Date: Fri Nov 4 00:25:32 2022 +0700 sim: erc32: link sis to run program =20 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. =20 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. =20 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. Diff: --- 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 41830aab726..013b604be49 100644 --- a/sim/erc32/Makefile.in +++ b/sim/erc32/Makefile.in @@ -34,13 +34,10 @@ SIM_EXTRA_CFLAGS +=3D -DFAST_UART -I$(srcroot) =20 ## COMMON_POST_CONFIG_FRAG =20 -# `sis' doesn't need interf.o. -SIS_OFILES =3D 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 $<= $@ =20 # Copy the files into directories where they will be run. install-sis: installdirs