[5/5] RISC-V: Add configure support for riscv*-linux*.
Commit Message
This adds the target and native configure support, and the NEWS entries for
the new target and native configurations.
gdb/
* Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
(ALLDEPFILES): Add riscv-linux-nat.c, riscv-linux-tdep.c.
* NEWS: Mention new GNU/Linux RISC-V target.
* configure.host: Add riscv*-*-linux*.
* configure.nat: Add riscv*.
* configure.tgt: Add riscv*-*-linux*.
---
gdb/Makefile.in | 3 +++
gdb/NEWS | 8 ++++++++
gdb/configure.host | 2 ++
gdb/configure.nat | 4 ++++
gdb/configure.tgt | 6 ++++++
5 files changed, 23 insertions(+)
Comments
> From: Jim Wilson <jimw@sifive.com>
> Cc: Jim Wilson <jimw@sifive.com>
> Date: Wed, 8 Aug 2018 17:26:50 -0700
>
> This adds the target and native configure support, and the NEWS entries for
> the new target and native configurations.
>
> gdb/
> * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
> (ALLDEPFILES): Add riscv-linux-nat.c, riscv-linux-tdep.c.
> * NEWS: Mention new GNU/Linux RISC-V target.
> * configure.host: Add riscv*-*-linux*.
> * configure.nat: Add riscv*.
> * configure.tgt: Add riscv*-*-linux*.
OK for the NEWS part.
Thanks.
>>>>> "Jim" == Jim Wilson <jimw@sifive.com> writes:
Jim> This adds the target and native configure support, and the NEWS entries for
Jim> the new target and native configurations.
Jim> gdb/
Jim> * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
Jim> (ALLDEPFILES): Add riscv-linux-nat.c, riscv-linux-tdep.c.
Jim> * NEWS: Mention new GNU/Linux RISC-V target.
Jim> * configure.host: Add riscv*-*-linux*.
Jim> * configure.nat: Add riscv*.
Jim> * configure.tgt: Add riscv*-*-linux*.
Thank you, this is ok.
Tom
On Thu, Aug 9, 2018 at 8:57 AM, Tom Tromey <tom@tromey.com> wrote:
>>>>>> "Jim" == Jim Wilson <jimw@sifive.com> writes:
>
> Jim> This adds the target and native configure support, and the NEWS entries for
> Jim> the new target and native configurations.
>
> Jim> gdb/
> Jim> * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
> Jim> (ALLDEPFILES): Add riscv-linux-nat.c, riscv-linux-tdep.c.
> Jim> * NEWS: Mention new GNU/Linux RISC-V target.
> Jim> * configure.host: Add riscv*-*-linux*.
> Jim> * configure.nat: Add riscv*.
> Jim> * configure.tgt: Add riscv*-*-linux*.
>
> Thank you, this is ok.
Committed.
Jim
@@ -752,6 +752,7 @@ ALL_TARGET_OBS = \
ppc-sysv-tdep.o \
ppc64-tdep.o \
ravenscar-thread.o \
+ riscv-linux-tdep.o \
riscv-tdep.o \
rl78-tdep.o \
rs6000-aix-tdep.o \
@@ -2300,6 +2301,8 @@ ALLDEPFILES = \
procfs.c \
ravenscar-thread.c \
remote-sim.c \
+ riscv-linux-nat.c \
+ riscv-linux-tdep.c \
riscv-tdep.c \
rl78-tdep.c \
rs6000-lynx178-tdep.c \
@@ -38,6 +38,14 @@ thread apply [all | COUNT | -COUNT] [FLAG]... COMMAND
FLAG arguments allow to control what output to produce and how to handle
errors raised when applying COMMAND to a thread.
+* New native configurations
+
+GNU/Linux/RISC-V riscv*-*-linux*
+
+* New targets
+
+GNU/Linux/RISC-V riscv*-*-linux*
+
*** Changes in GDB 8.2
* The 'set disassembler-options' command now supports specifying options
@@ -149,6 +149,8 @@ powerpc64*-*-linux*) gdb_host=ppc64-linux
;;
powerpc*-*-linux*) gdb_host=linux ;;
+riscv*-*-linux*) gdb_host=linux ;;
+
s390*-*-linux*) gdb_host=linux ;;
sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
@@ -267,6 +267,10 @@ case ${gdb_host} in
# Host: PowerPC, running Linux
NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o"
;;
+ riscv*)
+ # Host: RISC-V, running Linux
+ NATDEPFILES="${NATDEPFILES} riscv-linux-nat.o"
+ ;;
s390)
# Host: S390, running Linux
NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"
@@ -517,6 +517,12 @@ s390*-*-linux*)
build_gdbserver=yes
;;
+riscv*-*-linux*)
+ # Target: Linux/RISC-V
+ gdb_target_obs="riscv-linux-tdep.o riscv-tdep.o glibc-tdep.o \
+ linux-tdep.o solib-svr4.o symfile-mem.o linux-record.o"
+ ;;
+
riscv*-*-*)
# Target: RISC-V architecture
gdb_target_obs="riscv-tdep.o"