sim: enable hardware support by default

Message ID 20210424041958.12761-1-vapier@gentoo.org
State New
Headers show
Series
  • sim: enable hardware support by default
Related show

Commit Message

Weimin Pan via Gdb-patches April 24, 2021, 4:19 a.m.
Force this on for all ports.  We have a few common models that can
be used, so make them generally available.  If the port doesn't use
any hardware (the default), then behavior is unchanged.
---
 sim/aarch64/aclocal.m4         |   1 +
 sim/aarch64/config.in          |   6 ++
 sim/aarch64/configure          | 114 ++++++++++++++++++++++++++++++--
 sim/arm/aclocal.m4             |   1 +
 sim/arm/config.in              |   6 ++
 sim/arm/configure              | 114 ++++++++++++++++++++++++++++++--
 sim/avr/aclocal.m4             |   1 +
 sim/avr/config.in              |   6 ++
 sim/avr/configure              | 114 ++++++++++++++++++++++++++++++--
 sim/bpf/aclocal.m4             |   1 +
 sim/bpf/config.in              |   6 ++
 sim/bpf/configure              | 114 ++++++++++++++++++++++++++++++--
 sim/cr16/aclocal.m4            |   1 +
 sim/cr16/config.in             |   6 ++
 sim/cr16/configure             | 114 ++++++++++++++++++++++++++++++--
 sim/d10v/aclocal.m4            |   1 +
 sim/d10v/config.in             |   6 ++
 sim/d10v/configure             | 114 ++++++++++++++++++++++++++++++--
 sim/erc32/aclocal.m4           |   1 +
 sim/erc32/config.in            |   6 ++
 sim/erc32/configure            | 116 +++++++++++++++++++++++++++++++--
 sim/example-synacor/aclocal.m4 |   1 +
 sim/example-synacor/config.in  |   6 ++
 sim/example-synacor/configure  | 114 ++++++++++++++++++++++++++++++--
 sim/frv/configure              |   1 -
 sim/frv/configure.ac           |   2 -
 sim/ft32/aclocal.m4            |   1 +
 sim/ft32/config.in             |   6 ++
 sim/ft32/configure             | 114 ++++++++++++++++++++++++++++++--
 sim/h8300/aclocal.m4           |   1 +
 sim/h8300/config.in            |   6 ++
 sim/h8300/configure            | 114 ++++++++++++++++++++++++++++++--
 sim/iq2000/configure           |   1 -
 sim/iq2000/configure.ac        |   2 -
 sim/m32c/aclocal.m4            |   1 +
 sim/m32c/config.in             |   6 ++
 sim/m32c/configure             | 116 +++++++++++++++++++++++++++++++--
 sim/m4/sim_ac_output.m4        |   1 +
 sim/mcore/aclocal.m4           |   1 +
 sim/mcore/config.in            |   6 ++
 sim/mcore/configure            | 114 ++++++++++++++++++++++++++++++--
 sim/microblaze/aclocal.m4      |   1 +
 sim/microblaze/config.in       |   6 ++
 sim/microblaze/configure       | 114 ++++++++++++++++++++++++++++++--
 sim/moxie/aclocal.m4           |   1 +
 sim/moxie/config.in            |   6 ++
 sim/moxie/configure            | 114 ++++++++++++++++++++++++++++++--
 sim/msp430/aclocal.m4          |   1 +
 sim/msp430/config.in           |   6 ++
 sim/msp430/configure           | 114 ++++++++++++++++++++++++++++++--
 sim/or1k/aclocal.m4            |   1 +
 sim/or1k/config.in             |   6 ++
 sim/or1k/configure             | 114 ++++++++++++++++++++++++++++++--
 sim/pru/aclocal.m4             |   1 +
 sim/pru/config.in              |   6 ++
 sim/pru/configure              | 114 ++++++++++++++++++++++++++++++--
 sim/riscv/aclocal.m4           |   1 +
 sim/riscv/config.in            |   6 ++
 sim/riscv/configure            | 114 ++++++++++++++++++++++++++++++--
 sim/rl78/aclocal.m4            |   1 +
 sim/rl78/config.in             |   6 ++
 sim/rl78/configure             | 116 +++++++++++++++++++++++++++++++--
 sim/rx/aclocal.m4              |   1 +
 sim/rx/config.in               |   6 ++
 sim/rx/configure               | 116 +++++++++++++++++++++++++++++++--
 sim/sh/aclocal.m4              |   1 +
 sim/sh/config.in               |   6 ++
 sim/sh/configure               | 114 ++++++++++++++++++++++++++++++--
 sim/v850/aclocal.m4            |   1 +
 sim/v850/config.in             |   6 ++
 sim/v850/configure             | 114 ++++++++++++++++++++++++++++++--
 71 files changed, 2557 insertions(+), 120 deletions(-)

-- 
2.30.2

Comments

Tom Tromey April 24, 2021, 9:30 p.m. | #1
>>>>> "Mike" == Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> writes:


Mike> Force this on for all ports.  We have a few common models that can
Mike> be used, so make them generally available.  If the port doesn't use
Mike> any hardware (the default), then behavior is unchanged.

I didn't bisect, so I am not completely sure, but some recent patch
(maybe this one) caused:

../../../binutils-gdb/sim/mips/../common/dv-sockser.c:226:1: warning: no previous prototype for ‘dv_sockser_install’ [-Wmissing-prototypes]
  226 | dv_sockser_install (SIM_DESC sd)
      | ^~~~~~~~~~~~~~~~~~
../../../binutils-gdb/sim/mips/../common/dv-sockser.c:287:1: error: redefinition of ‘dv_sockser_status’
  287 | dv_sockser_status (SIM_DESC sd)
      | ^~~~~~~~~~~~~~~~~
In file included from ../../../binutils-gdb/sim/mips/../common/dv-sockser.c:49:
../../../binutils-gdb/sim/mips/../common/dv-sockser.h:44:1: note: previous definition of ‘dv_sockser_status’ was here
   44 | dv_sockser_status (SIM_DESC sd)
      | ^~~~~~~~~~~~~~~~~
../../../binutils-gdb/sim/mips/../common/dv-sockser.c:342:1: error: redefinition of ‘dv_sockser_write_buffer’
  342 | dv_sockser_write_buffer (SIM_DESC sd, const unsigned char *buffer,
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../binutils-gdb/sim/mips/../common/dv-sockser.c:49:
../../../binutils-gdb/sim/mips/../common/dv-sockser.h:58:1: note: previous definition of ‘dv_sockser_write_buffer’ was here
   58 | dv_sockser_write_buffer (SIM_DESC sd, const unsigned char *buffer,
      | ^~~~~~~~~~~~~~~~~~~~~~~
../../../binutils-gdb/sim/mips/../common/dv-sockser.c:365:1: error: redefinition of ‘dv_sockser_write’
  365 | dv_sockser_write (SIM_DESC sd, unsigned char c)
      | ^~~~~~~~~~~~~~~~
In file included from ../../../binutils-gdb/sim/mips/../common/dv-sockser.c:49:
../../../binutils-gdb/sim/mips/../common/dv-sockser.h:52:1: note: previous definition of ‘dv_sockser_write’ was here
   52 | dv_sockser_write (SIM_DESC sd, unsigned char c)
      | ^~~~~~~~~~~~~~~~
../../../binutils-gdb/sim/mips/../common/dv-sockser.c:371:1: error: redefinition of ‘dv_sockser_read’
  371 | dv_sockser_read (SIM_DESC sd)
      | ^~~~~~~~~~~~~~~
In file included from ../../../binutils-gdb/sim/mips/../common/dv-sockser.c:49:
../../../binutils-gdb/sim/mips/../common/dv-sockser.h:65:1: note: previous definition of ‘dv_sockser_read’ was here
   65 | dv_sockser_read (SIM_DESC sd)
      | ^~~~~~~~~~~~~~~
make[3]: *** [Makefile:578: dv-sockser.o] Error 1

thanks,
Tom
Weimin Pan via Gdb-patches April 24, 2021, 10:34 p.m. | #2
On 24 Apr 2021 15:30, Tom Tromey wrote:
> >>>>> "Mike" == Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> writes:

> 

> Mike> Force this on for all ports.  We have a few common models that can

> Mike> be used, so make them generally available.  If the port doesn't use

> Mike> any hardware (the default), then behavior is unchanged.

> 

> I didn't bisect, so I am not completely sure, but some recent patch

> (maybe this one) caused:


this one hasn't been merged yet

> ../../../binutils-gdb/sim/mips/../common/dv-sockser.c:226:1: warning: no previous prototype for ‘dv_sockser_install’ [-Wmissing-prototypes]

>   226 | dv_sockser_install (SIM_DESC sd)

>       | ^~~~~~~~~~~~~~~~~~


i've seen this when the dir doesn't fully reconfigure.  i fixed it with a
`rm -rf sim && make all-sim`.
-mike
Tom Tromey April 26, 2021, 1:24 p.m. | #3
>> I didn't bisect, so I am not completely sure, but some recent patch

>> (maybe this one) caused:


Mike> this one hasn't been merged yet

Oops, my bad.

>> ../../../binutils-gdb/sim/mips/../common/dv-sockser.c:226:1: warning: no previous prototype for ‘dv_sockser_install’ [-Wmissing-prototypes]

>> 226 | dv_sockser_install (SIM_DESC sd)

>> | ^~~~~~~~~~~~~~~~~~


Mike> i've seen this when the dir doesn't fully reconfigure.  i fixed it with a
Mike> `rm -rf sim && make all-sim`.

Thanks, this worked for me.  Maybe this is something that will be fixed
by the eventual build changes.

Tom

Patch

diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac
index 6588fe5e87e7..e5bbdbfba228 100644
--- a/sim/frv/configure.ac
+++ b/sim/frv/configure.ac
@@ -27,6 +27,4 @@  if test x"$silent" != x"yes" && test x"$sim_trapdump" != x""; then
 fi],[sim_trapdump=""])dnl
 AC_SUBST(sim_trapdump)
 
-SIM_AC_OPTION_HARDWARE
-
 SIM_AC_OUTPUT
diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac
index f21bc804bdd8..623fa192d74b 100644
--- a/sim/iq2000/configure.ac
+++ b/sim/iq2000/configure.ac
@@ -11,6 +11,4 @@  SIM_AC_OPTION_DEFAULT_MODEL(iq2000)
 SIM_AC_OPTION_WARNINGS(no)
 SIM_AC_OPTION_CGEN_MAINT
 
-SIM_AC_OPTION_HARDWARE
-
 SIM_AC_OUTPUT
diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4
index 9ec566d8acd2..b18f2540f70b 100644
--- a/sim/m4/sim_ac_output.m4
+++ b/sim/m4/sim_ac_output.m4
@@ -22,6 +22,7 @@  dnl the target's fragment at the appropriate points.
 AC_DEFUN([SIM_AC_OUTPUT],
 [dnl
 AC_REQUIRE([SIM_AC_OPTION_WARNINGS])dnl
+AC_REQUIRE([SIM_AC_OPTION_HARDWARE])dnl
 
 dnl Make @cgen_breaks@ non-null only if the sim uses CGEN.
 cgen_breaks=""