gdb: fix powerpc build issues with musl
authorFelix Fietkau <nbd@openwrt.org>
Tue, 16 Feb 2016 21:30:20 +0000 (21:30 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 16 Feb 2016 21:30:20 +0000 (21:30 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48731

package/devel/gdb/patches/100-musl_fix.patch

index c0c1e0aee5bf03c0636b5555960fc0ee99ac4efd..afe9dc7aac13208aeceae8ac39e1a5e57f8d7ca0 100644 (file)
 +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
 +#endif
 +
+--- a/gdb/nat/ppc-linux.h
++++ b/gdb/nat/ppc-linux.h
+@@ -18,7 +18,10 @@
+ #ifndef PPC_LINUX_H
+ #define PPC_LINUX_H 1
++#define pt_regs __pt_regs
+ #include <asm/ptrace.h>
++#undef pt_regs
++
+ #include <asm/cputable.h>
+ /* This sometimes isn't defined.  */
+--- a/gdb/gdbserver/linux-ppc-low.c
++++ b/gdb/gdbserver/linux-ppc-low.c
+@@ -21,7 +21,9 @@
+ #include "linux-low.h"
+ #include <elf.h>
++#define pt_regs __pt_regs
+ #include <asm/ptrace.h>
++#undef pt_regs
+ #include "nat/ppc-linux.h"