0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch 997 B

1234567891011121314151617181920212223242526272829303132
  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. This helps building gdb on mips64 on musl, since
  6. musl does not provide sgidefs.h this define is
  7. only defined when GCC is using o32 ABI, in that
  8. case gcc emits it as built-in define and hence
  9. it works ok for mips32
  10. Upstream-Status: Pending
  11. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  12. ---
  13. gdb/mips-linux-nat.c | 4 ++++
  14. 1 file changed, 4 insertions(+)
  15. diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
  16. index 972b5db8e76..5e68538a3ba 100644
  17. --- a/gdb/mips-linux-nat.c
  18. +++ b/gdb/mips-linux-nat.c
  19. @@ -41,6 +41,10 @@
  20. #ifndef PTRACE_GET_THREAD_AREA
  21. #define PTRACE_GET_THREAD_AREA 25
  22. #endif
  23. +/* musl does not define and relies on compiler built-in macros for it */
  24. +#ifndef _ABIO32
  25. +#define _ABIO32 1
  26. +#endif
  27. class mips_linux_nat_target final : public linux_nat_trad_target
  28. {