Skip to content

Commit

Permalink
binutils: Replace interim gdb build fix with final fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwmjones committed Jan 4, 2018
1 parent 5556b31 commit b544a72
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ coreutils-$(COREUTILS_VERSION).tar.xz:
# Cross-compile binutils.
stage3-chroot/usr/bin/as:
# We want to patch this tree so we have to make a copy.
# Fix for https://github.com/riscv/riscv-binutils-gdb/issues/96
rm -rf riscv-binutils-gdb
cp -a riscv-tools/riscv-gnu-toolchain/riscv-binutils-gdb riscv-binutils-gdb
# Fix for https://github.com/riscv/riscv-binutils-gdb/pull/126
cd riscv-binutils-gdb && \
patch -p1 < ../riscv-binutils-fix-gdb.patch
rm -rf riscv-binutils-gdb/build-x
Expand Down
47 changes: 37 additions & 10 deletions riscv-binutils-fix-gdb.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
--- riscv-binutils-gdb-riscv-binutils-2.29/gdb/Makefile.in.old 2017-12-04 22:15:15.000000000 +0000
+++ riscv-binutils-gdb-riscv-binutils-2.29/gdb/Makefile.in 2017-12-27 19:39:11.348372955 +0000
@@ -1797,6 +1797,7 @@
reggroups.o \
registry.o \
reverse.o \
+ riscv-linux-nat.o \
rsp-low.o \
run-time-clock.o \
rust-lang.o \
From be4ba407492795ba6597fe96d3d8ec6ee2267cd0 Mon Sep 17 00:00:00 2001
From: Jim Wilson <[email protected]>
Date: Thu, 28 Dec 2017 14:10:39 -0800
Subject: [PATCH] Make native gdb builds work.

---
gdb/Makefile.in | 1 +
gdb/configure.nat | 4 ++++
2 files changed, 5 insertions(+)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ef575cad101..d63e13ba28e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2636,6 +2636,7 @@ ALLDEPFILES = \
ravenscar-thread.c \
remote-sim.c \
riscv-tdep.c \
+ riscv-linux-nat.c \
riscv-linux-tdep.c \
rl78-tdep.c \
rs6000-lynx178-tdep.c \
diff --git a/gdb/configure.nat b/gdb/configure.nat
index 2026ee76f5b..9b0332fdd68 100644
--- a/gdb/configure.nat
+++ b/gdb/configure.nat
@@ -259,6 +259,10 @@ case ${gdb_host} in
# Host: PowerPC, running Linux
NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o"
;;
+ riscv)
+ # Host: RISC-V, running Linux
+ NATDEPFILES="${NATDEPFILES} riscv-linux-nat.o"
+ ;;
s390)
# Host: S390, running Linux
NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"

0 comments on commit b544a72

Please sign in to comment.