From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 517FB3858C62; Fri, 4 Nov 2022 00:43:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 517FB3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667522623; bh=XrhUVHd9Mihb0+FkXnFl8SZtW6DUFQyKqil9cW8I0aE=; h=From:To:Subject:Date:From; b=rxj68sbLM2ScgHcPZWs2JDapPnvfTB/0w+PSHExGrCtKUvqpGngYwbrJ2738PC8jE I78M0umRQdIe5rEKvHgtSeAcxKnVKbgiPkoTN50Py8clhPywzcPD7HA5XKR0eQF4dq x0chHvUNOUqpLXQKVjFoEWnqyArXJ5FVvw9FAeBI= 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: build: switch to libtool for linking X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 231f62da1d56046f7f7706b5699a7544c2cae2f7 X-Git-Newrev: 90db43bb0325ce387da536f4939bfe01e80227b2 Message-Id: <20221104004343.517FB3858C62@sourceware.org> Date: Fri, 4 Nov 2022 00:43:43 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D90db43bb0325= ce387da536f4939bfe01e80227b2 commit 90db43bb0325ce387da536f4939bfe01e80227b2 Author: Mike Frysinger Date: Thu Nov 3 13:11:41 2022 +0545 sim: build: switch to libtool for linking =20 The top-level already sets up a libtool script for the host, so use that when linking rather than invoking CC directly. This will also happen when we (someday) move the building to pure automake. Diff: --- sim/arch-subdir.mk.in | 8 ++++++++ sim/common/Make-common.in | 12 +++++++----- sim/cris/Makefile.in | 3 ++- sim/ppc/Makefile.in | 3 ++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in index 2c0e2bbce93..dd75abcec22 100644 --- a/sim/arch-subdir.mk.in +++ b/sim/arch-subdir.mk.in @@ -17,6 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . =20 +AM_V =3D @AM_V@ + host_alias =3D @host_alias@ target_alias =3D @target_alias@ program_transform_name =3D @program_transform_name@ @@ -42,6 +44,12 @@ AR_FLAGS =3D rc RANLIB =3D @RANLIB@ DTC =3D @DTC@ =20 +LIBTOOL =3D @LIBTOOL@ +AM_V_lt =3D $(am__v_lt_@AM_V@) +am__v_lt_ =3D $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 =3D --silent +am__v_lt_1 =3D=20 + DEPMODE =3D @CCDEPMODE@ DEPDIR =3D @DEPDIR@ =20 diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index a6c54dc41d3..83b1cf111c7 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -43,6 +43,9 @@ srcsim =3D $(srcdir)/.. @SIM_COMMON_BUILD_FALSE@config.status =3D config.status @SIM_COMMON_BUILD_TRUE@config.status =3D ../config.status =20 +# Settings from top-level configure. +include ../arch-subdir.mk + include $(srcroot)/gdb/silent-rules.mk =20 ifeq ($(V),0) @@ -56,9 +59,6 @@ endif GNULIB_PARENT_DIR =3D ../.. include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc =20 -# Settings from top-level configure. -include ../arch-subdir.mk - prefix =3D @prefix@ exec_prefix =3D @exec_prefix@ =20 @@ -258,7 +258,8 @@ libsim.a: $(LIB_OBJS) $(ECHO_RANLIB) $(RANLIB) libsim.a =20 run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS) - $(ECHO_CCLD) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o run$(EXEEXT) \ + $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=3DCC --mode=3Dlink \ + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o run$(EXEEXT) \ $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS) =20 # @@ -416,7 +417,8 @@ stamp-hw: Makefile.in $(srccom)/Make-common.in $(config= .status) Makefile $(SILENCE) touch $@ =20 test-hw-events: $(srccom)/hw-events.c libsim.a - $(CC) $(ALL_CFLAGS) -DMAIN -o test-hw-events$(EXEEXT) \ + $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=3DCC --mode=3Dlink \ + $(CC) $(ALL_CFLAGS) -DMAIN -o test-hw-events$(EXEEXT) \ $(srccom)/hw-events.c libsim.a $(EXTRA_LIBS) =20 # See sim_pre_argv_init and sim_module_install in sim-module.c for more de= tails. diff --git a/sim/cris/Makefile.in b/sim/cris/Makefile.in index d58aeee9363..c3660e76f0d 100644 --- a/sim/cris/Makefile.in +++ b/sim/cris/Makefile.in @@ -53,7 +53,8 @@ all: rvdummy$(EXEEXT) check: rvdummy$(EXEEXT) =20 rvdummy$(EXEEXT): rvdummy.o $(EXTRA_LIBDEPS) - $(ECHO_CCLD) $(CC) $(ALL_CFLAGS) -o rvdummy$(EXEEXT) rvdummy.o $(EXTRA_LI= BS) + $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=3DCC --mode=3Dlink \ + $(CC) $(ALL_CFLAGS) -o rvdummy$(EXEEXT) rvdummy.o $(EXTRA_LIBS) =20 rvdummy.o: rvdummy.c $(remote_sim_h) $(callback_h) =20 diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 9eec4252971..2b5a11aefea 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -522,7 +522,8 @@ PACKAGE_OBJ =3D @sim_pk_obj@ =20 =20 psim$(EXEEXT): $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_D= EP) - $(ECHO_CCLD) $(CC) $(CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETL= IB) $(BFD_LIB) $(ZLIB) $(ZSTD_LIBS) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS) + $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=3DCC --mode=3Dlink \ + $(CC) $(CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_L= IB) $(ZLIB) $(ZSTD_LIBS) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS) =20 run$(EXEEXT): psim$(EXEEXT) $(SILENCE) rm -f $@