Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 1 | From 73b71f0b85dd6c8181f2f11a427400d4870fabcc Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 23 Mar 2016 06:30:09 +0000 |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 4 | Subject: [PATCH] mips-linux-nat: Define _ABIO32 if not defined |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 19 | index 972b5db8e76..5e68538a3ba 100644 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | { |