summaryrefslogtreecommitdiff
path: root/system/gdb/arm64.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-03-24 22:00:41 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-03-24 22:00:41 +0000
commitd066f50d95b96ea36bd163db3ddea496824df7e1 (patch)
treea611a23f1985a3978ab1dfe2878ded44c2eea973 /system/gdb/arm64.patch
parentd80ab3f4677f8e57e338a6862b02c1398d4ee69f (diff)
downloadpackages-d066f50d95b96ea36bd163db3ddea496824df7e1.tar.gz
packages-d066f50d95b96ea36bd163db3ddea496824df7e1.tar.bz2
packages-d066f50d95b96ea36bd163db3ddea496824df7e1.tar.xz
packages-d066f50d95b96ea36bd163db3ddea496824df7e1.zip
system/gdb: bump to 8.2.1, fix build on 64-bit ARM
Diffstat (limited to 'system/gdb/arm64.patch')
-rw-r--r--system/gdb/arm64.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/system/gdb/arm64.patch b/system/gdb/arm64.patch
new file mode 100644
index 000000000..a718a8c6a
--- /dev/null
+++ b/system/gdb/arm64.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) */
+