From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 54078385841A; Sat, 5 Nov 2022 03:43:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54078385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667619802; bh=iMc4DON7EXdQydHPCqEmQ6UUenqmvHQdPpIBvEhDEgw=; h=From:To:Subject:Date:From; b=yKkqrz8aM7P2X5GOePzuEFT293m5mjp3ScIn7oTfl6WUoxG/6L4x0FJAW+1eWlgKG W34Tc6XuazrKkuWhztOBSDXS/7ZcwUE0iD3DVTUlW3VIhvSt38/uPgxfTcwR3/2ker RK93V1aOHMc5iCgblhWcGJGZuTOxu89Ra2TdtQTo= 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: ppc: inline the sim-packages option X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 31ee179e275a25625f66e7045a651433f9856087 X-Git-Newrev: 319e41e83a405bcc975c706faa172a0c2ab63598 Message-Id: <20221105034322.54078385841A@sourceware.org> Date: Sat, 5 Nov 2022 03:43:22 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D319e41e83a40= 5bcc975c706faa172a0c2ab63598 commit 319e41e83a405bcc975c706faa172a0c2ab63598 Author: Mike Frysinger Date: Sat Nov 5 09:29:17 2022 +0700 sim: ppc: inline the sim-packages option =20 This has only ever had a single option that's enabled by default. The objects it adds are pretty small and don't add overhead at runtime if it isn't used, so just enable it all the time to make the build code simpler. Diff: --- sim/ppc/Makefile.in | 18 ++++++++++-------- sim/ppc/configure | 31 ------------------------------- sim/ppc/configure.ac | 24 ------------------------ sim/ppc/pk.h | 2 ++ 4 files changed, 12 insertions(+), 63 deletions(-) diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index b1fda1fbff4..6575f962c9d 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -516,8 +516,8 @@ GDB_OBJ =3D gdb-sim.o sim_calls.o HW_SRC =3D @sim_hw_src@ HW_OBJ =3D @sim_hw_obj@ =20 -PACKAGE_SRC =3D @sim_pk_src@ -PACKAGE_OBJ =3D @sim_pk_obj@ +PACKAGE_SRC =3D pk_disklabel.c +PACKAGE_OBJ =3D $(PACKAGE_SRC:.c=3D.o) =20 =20 psim$(EXEEXT): $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) @@ -528,7 +528,7 @@ run$(EXEEXT): psim$(EXEEXT) $(SILENCE) rm -f $@ $(ECHO_GEN) ln $< $@ 2>/dev/null || $(LN_S) $< $@ 2>/dev/null || cp -p $<= $@ =20 -$(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB= _OBJ) +$(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-defines $(LIB_OBJ) $(GDB_OBJ) $(ECHO_AR) $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ) $(ECHO_RANLIB) $(RANLIB) $(TARGETLIB) =20 @@ -782,10 +782,12 @@ hw_vm.o: hw_vm.c $(DEVICE_TABLE_H) $(CPU_H) =20 =20 # real packages -pk.h: tmp-pk; @true -tmp-pk: Makefile $(PACKAGE_SRC) $(srcroot)/move-if-change +$(srcdir)/pk.h: $(MAINT) tmp-pk + @true +tmp-pk: $(srcdir)/Makefile.in $(PACKAGE_SRC) $(srcroot)/move-if-change $(ECHO_GEN)# The first for loop is to remove duplicates. - $(SILENCE) f=3D""; \ + $(SILENCE) echo "/* Generated file by Makefile.in; do not edit. */" > tm= p-pk.h; \ + f=3D""; \ for i in $(PACKAGE_SRC) ; do \ case " $$f " in \ *" $$i "*) ;; \ @@ -796,8 +798,8 @@ tmp-pk: Makefile $(PACKAGE_SRC) $(srcroot)/move-if-chan= ge | sed -e 's/^.*pk_\(.*\)\.c/\1/' \ -e 's/^/extern package_create_instance_callback pk_/' \ -e 's/$$/_create_instance;/' \ - > tmp-pk.h - $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-pk.h pk.h + >> tmp-pk.h + $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-pk.h $(srcdir)/pk.h $(SILENCE) touch $@ =20 pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H) diff --git a/sim/ppc/configure b/sim/ppc/configure index 98557846236..c202901dabc 100755 --- a/sim/ppc/configure +++ b/sim/ppc/configure @@ -634,8 +634,6 @@ sim_bitsize sim_igen_smp sim_smp sim_xor_endian -sim_pk_obj -sim_pk_src sim_hw_obj sim_hw_src sim_icache @@ -727,7 +725,6 @@ enable_sim_model enable_sim_model_issue enable_sim_monitor enable_sim_opcode -enable_sim_packages enable_sim_smp enable_sim_switch enable_sim_timebase @@ -1369,7 +1366,6 @@ Optional Features: --enable-sim-model-issue Specify whether to simulate model specific act= ions --enable-sim-monitor=3Dmon Specify whether to enable monitoring events. --enable-sim-opcode=3Dwhich Override default opcode lookup. - --enable-sim-packages=3Dlist Specify the packages to be included in the= build. --enable-sim-smp=3Dn Specify number of processors to configure for. --enable-sim-switch Use a switch instead of a table for instruction ca= ll. --enable-sim-timebase Specify whether the PPC timebase is supported. @@ -3497,31 +3493,6 @@ fi fi =20 =20 -# Check whether --enable-sim-packages was given. -if test "${enable_sim_packages+set}" =3D set; then : - enableval=3D$enable_sim_packages; packages=3Ddisklabel -case "${enableval}" in - yes) ;; - no) as_fn_error $? "\"List of packages must be specified for --enable-si= m-packages\"" "$LINENO" 5; packages=3D"";; - ,*) packages=3D"${packages}${enableval}";; - *,) packages=3D"${enableval}${packages}";; - *) packages=3D"${enableval}"'';; -esac -sim_pk_src=3D`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$= /.c/'` -sim_pk_obj=3D`echo $sim_pk_src | sed -e 's/\.c/.o/g'` -if test x"$silent" !=3D x"yes" && test x"$packages" !=3D x""; then - echo "Setting packages to $sim_pk_src, $sim_pk_obj" -fi -else - packages=3Ddisklabel -sim_pk_src=3D`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$= /.c/'` -sim_pk_obj=3D`echo $sim_pk_src | sed -e 's/\.c/.o/g'` -if test x"$silent" !=3D x"yes"; then - echo "Setting packages to $sim_pk_src, $sim_pk_obj" -fi -fi - - # Check whether --enable-sim-smp was given. if test "${enable_sim_smp+set}" =3D set; then : enableval=3D$enable_sim_smp; case "${enableval}" in @@ -4301,8 +4272,6 @@ fi =20 =20 =20 - - =20 =20 =20 diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index b5909b70571..f26912eacde 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -337,28 +337,6 @@ if test x"$silent" !=3D x"yes"; then fi])dnl =20 =20 -AC_ARG_ENABLE(sim-packages, -[ --enable-sim-packages=3Dlist Specify the packages to be included in th= e build.], -[packages=3Ddisklabel -case "${enableval}" in - yes) ;; - no) AC_MSG_ERROR("List of packages must be specified for --enable-sim-pa= ckages"); packages=3D"";; - ,*) packages=3D"${packages}${enableval}";; - *,) packages=3D"${enableval}${packages}";; - *) packages=3D"${enableval}"'';; -esac -sim_pk_src=3D`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$= /.c/'` -sim_pk_obj=3D`echo $sim_pk_src | sed -e 's/\.c/.o/g'` -if test x"$silent" !=3D x"yes" && test x"$packages" !=3D x""; then - echo "Setting packages to $sim_pk_src, $sim_pk_obj" -fi],[packages=3Ddisklabel -sim_pk_src=3D`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$= /.c/'` -sim_pk_obj=3D`echo $sim_pk_src | sed -e 's/\.c/.o/g'` -if test x"$silent" !=3D x"yes"; then - echo "Setting packages to $sim_pk_src, $sim_pk_obj" -fi])dnl - - AC_ARG_ENABLE(sim-smp, [ --enable-sim-smp=3Dn Specify number of processors to configure for.], [case "${enableval}" in @@ -590,8 +568,6 @@ AC_SUBST(sim_filter) AC_SUBST(sim_icache) AC_SUBST(sim_hw_src) AC_SUBST(sim_hw_obj) -AC_SUBST(sim_pk_src) -AC_SUBST(sim_pk_obj) AC_SUBST(sim_xor_endian) AC_SUBST(sim_smp) AC_SUBST(sim_igen_smp) diff --git a/sim/ppc/pk.h b/sim/ppc/pk.h new file mode 100644 index 00000000000..b4de9965845 --- /dev/null +++ b/sim/ppc/pk.h @@ -0,0 +1,2 @@ +/* Generated file; do not edit. */ +extern package_create_instance_callback pk_disklabel_create_instance;