010-aarch64-headers.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. The signal definitions of musl and gdb collide
  2. The kernel defines "struct sigcontext" in asm/sigcontext.h and musl libc
  3. defines it in signal.h which collides.
  4. Kernel 4.14 misses the definitions of struct user_sve_header so we still
  5. have to use the aarch64-sve-linux-sigcontext.h header file which also
  6. provides that and make sure aarch64-sve-linux-sigcontext.h does not
  7. provide the same headers as the kernel or musl.
  8. --- a/gdb/nat/aarch64-sve-linux-ptrace.h
  9. +++ b/gdb/nat/aarch64-sve-linux-ptrace.h
  10. @@ -25,7 +25,7 @@
  11. #include <sys/ptrace.h>
  12. #include <asm/ptrace.h>
  13. -#ifndef SVE_SIG_ZREGS_SIZE
  14. +#ifndef SVE_PT_REGS_SVE
  15. #include "aarch64-sve-linux-sigcontext.h"
  16. #endif
  17. --- a/gdb/nat/aarch64-sve-linux-sigcontext.h
  18. +++ b/gdb/nat/aarch64-sve-linux-sigcontext.h
  19. @@ -19,6 +19,7 @@
  20. #ifndef NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
  21. #define NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
  22. +#ifndef SVE_MAGIC
  23. #define SVE_MAGIC 0x53564501
  24. struct sve_context {
  25. @@ -128,6 +129,7 @@ struct sve_context {
  26. (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
  27. #define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
  28. +#endif
  29. /* SVE/FP/SIMD state (NT_ARM_SVE) */