b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | From e92f8932ef488de2a56db4299131ce6a4eb170bd 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 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 13 | --- |
| 14 | Upstream-Status: Pending |
| 15 | |
| 16 | gdb/mips-linux-nat.c | 5 +++++ |
| 17 | 1 file changed, 5 insertions(+) |
| 18 | |
| 19 | --- a/gdb/mips-linux-nat.c |
| 20 | +++ b/gdb/mips-linux-nat.c |
| 21 | @@ -41,6 +41,11 @@ |
| 22 | #define PTRACE_GET_THREAD_AREA 25 |
| 23 | #endif |
| 24 | |
| 25 | +/* musl does not define and relies on compiler built-in macros for it */ |
| 26 | +#ifndef _ABIO32 |
| 27 | +#define _ABIO32 1 |
| 28 | +#endif |
| 29 | + |
| 30 | class mips_linux_nat_target final : public linux_nat_trad_target |
| 31 | { |
| 32 | public: |