blob: 55bdbf644c15c18cdd9911c9c91daf57340439c8 [file] [log] [blame]
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06001From 73b71f0b85dd6c8181f2f11a427400d4870fabcc Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 23 Mar 2016 06:30:09 +0000
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004Subject: [PATCH] mips-linux-nat: Define _ABIO32 if not defined
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
6This helps building gdb on mips64 on musl, since
7musl does not provide sgidefs.h this define is
8only defined when GCC is using o32 ABI, in that
9case gcc emits it as built-in define and hence
10it works ok for mips32
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 gdb/mips-linux-nat.c | 4 ++++
16 1 file changed, 4 insertions(+)
17
18diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060019index 972b5db8e76..5e68538a3ba 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050020--- 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 {