Skip to content

Commit

Permalink
Add a patch to gdb that fixes compilation with gcc 10
Browse files Browse the repository at this point in the history
  • Loading branch information
zeldin committed Mar 20, 2021
1 parent 21b036c commit d52b569
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
26 changes: 26 additions & 0 deletions patches/gdb-7.5.1-PS3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From e90e9ad97190c3e187285682d905582503f4a42a Mon Sep 17 00:00:00 2001
From: Tom Tromey <[email protected]>
Date: Wed, 5 Dec 2012 14:56:18 +0000
Subject: [PATCH] PR gdb/14917: * server.h (current_insn_ptr,
emit_error): Declare 'extern'.

---
gdb/gdbserver/ChangeLog | 5 +++++
gdb/gdbserver/server.h | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index e93ad00c1d1..929819e55bc 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -523,8 +523,8 @@ CORE_ADDR get_get_tsv_func_addr (void);
function in the IPA. */
CORE_ADDR get_set_tsv_func_addr (void);

-CORE_ADDR current_insn_ptr;
-int emit_error;
+extern CORE_ADDR current_insn_ptr;
+extern int emit_error;

/* Version information, from version.c. */
extern const char version[];
3 changes: 3 additions & 0 deletions scripts/003-gdb-PPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ if [ ! -d ${GDB} ]; then
## Unpack the source code.
tar xfvj ${GDB}.tar.bz2

## Patch the source code.
cat ../patches/${GDB}-PS3.patch | patch -p1 -d ${GDB}

## Replace config.guess and config.sub
cp config.guess config.sub ${GDB}

Expand Down
3 changes: 3 additions & 0 deletions scripts/007-gdb-SPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ if [ ! -d ${GDB} ]; then
## Unpack the source code.
tar xfvj ${GDB}.tar.bz2

## Patch the source code.
cat ../patches/${GDB}-PS3.patch | patch -p1 -d ${GDB}

## Replace config.guess and config.sub
cp config.guess config.sub ${GDB}

Expand Down

0 comments on commit d52b569

Please sign in to comment.