diff options
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch')
-rw-r--r-- | meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch new file mode 100644 index 0000000000..55bdbf644c --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 73b71f0b85dd6c8181f2f11a427400d4870fabcc Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 23 Mar 2016 06:30:09 +0000 | ||
4 | Subject: [PATCH] mips-linux-nat: Define _ABIO32 if not defined | ||
5 | |||
6 | This helps building gdb on mips64 on musl, since | ||
7 | musl does not provide sgidefs.h this define is | ||
8 | only defined when GCC is using o32 ABI, in that | ||
9 | case gcc emits it as built-in define and hence | ||
10 | it works ok for mips32 | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | gdb/mips-linux-nat.c | 4 ++++ | ||
16 | 1 file changed, 4 insertions(+) | ||
17 | |||
18 | diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c | ||
19 | index 972b5db8e76..5e68538a3ba 100644 | ||
20 | --- a/gdb/mips-linux-nat.c | ||
21 | +++ b/gdb/mips-linux-nat.c | ||
22 | @@ -41,6 +41,10 @@ | ||
23 | #ifndef PTRACE_GET_THREAD_AREA | ||
24 | #define PTRACE_GET_THREAD_AREA 25 | ||
25 | #endif | ||
26 | +/* musl does not define and relies on compiler built-in macros for it */ | ||
27 | +#ifndef _ABIO32 | ||
28 | +#define _ABIO32 1 | ||
29 | +#endif | ||
30 | |||
31 | class mips_linux_nat_target final : public linux_nat_trad_target | ||
32 | { | ||