diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2019-01-02 16:32:35 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-01-12 22:38:50 +0100 |
commit | bc89690f6e2c80e100b4dbfbabc7c7adb8218d74 (patch) | |
tree | 4063ff38ca2745cdd18a08a2a9f9af9f0156e7a5 /package/devel | |
parent | 6be064c788f5c2edc49c24c9e9c2b48d63a8811c (diff) | |
download | upstream-bc89690f6e2c80e100b4dbfbabc7c7adb8218d74.tar.gz upstream-bc89690f6e2c80e100b4dbfbabc7c7adb8218d74.tar.bz2 upstream-bc89690f6e2c80e100b4dbfbabc7c7adb8218d74.zip |
gdb: The signal definitions of musl and gdb collide
This fixes compilation of gdb on arm64.
The kernel defines "struct sigcontext" in asm/sigcontext.h and musl libc
defines it in signal.h, which collides.
Kernel 4.14 misses the definitions of struct user_sve_header so we still
have to use the aarch64-sve-linux-sigcontext.h header file which also
provides that and make sure aarch64-sve-linux-sigcontext.h does not
provide the same headers as the kernel or musl.
Fixes: FS#2040
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/devel')
-rw-r--r-- | package/devel/gdb/patches/010-aarch64-headers.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/package/devel/gdb/patches/010-aarch64-headers.patch b/package/devel/gdb/patches/010-aarch64-headers.patch new file mode 100644 index 0000000000..a718a8c6a4 --- /dev/null +++ b/package/devel/gdb/patches/010-aarch64-headers.patch @@ -0,0 +1,44 @@ +The signal definitions of musl and gdb collide + +The kernel defines "struct sigcontext" in asm/sigcontext.h and musl libc +defines it in signal.h which collides. +Kernel 4.14 misses the definitions of struct user_sve_header so we still +have to use the aarch64-sve-linux-sigcontext.h header file which also +provides that and make sure aarch64-sve-linux-sigcontext.h does not +provide the same headers as the kernel or musl. + +--- a/gdb/nat/aarch64-sve-linux-ptrace.h ++++ b/gdb/nat/aarch64-sve-linux-ptrace.h +@@ -20,12 +20,12 @@ + #ifndef AARCH64_SVE_LINUX_PTRACE_H + #define AARCH64_SVE_LINUX_PTRACE_H + +-#include <asm/sigcontext.h> ++#include <signal.h> + #include <sys/utsname.h> + #include <sys/ptrace.h> + #include <asm/ptrace.h> + +-#ifndef SVE_SIG_ZREGS_SIZE ++#ifndef SVE_PT_REGS_SVE + #include "aarch64-sve-linux-sigcontext.h" + #endif + +--- a/gdb/nat/aarch64-sve-linux-sigcontext.h ++++ b/gdb/nat/aarch64-sve-linux-sigcontext.h +@@ -19,6 +19,7 @@ + #ifndef AARCH64_SVE_LINUX_SIGCONTEXT_H + #define AARCH64_SVE_LINUX_SIGCONTEXT_H + ++#ifndef SVE_MAGIC + #define SVE_MAGIC 0x53564501 + + struct sve_context { +@@ -128,6 +129,7 @@ struct sve_context { + (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET) + + #define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) ++#endif + + /* SVE/FP/SIMD state (NT_ARM_SVE) */ + |