Browse Source

fix musl ppc compile, from sabotage

Waldemar Brodkorb 10 years ago
parent
commit
03f50b1de4

+ 3 - 0
package/strace/Makefile

@@ -25,6 +25,9 @@ TARGET_CFLAGS+=		-static
 endif
 ifeq ($(ADK_TARGET_LIB_MUSL),y)
 TARGET_CPPFLAGS+=	-DMSG_EXCEPT=020000 -D_LARGEFILE64_SOURCE=1
+ifeq ($(ADK_LINUX_PPC),y)
+TARGET_CPPFLAGS+=	-Dsigcontext_struct=sigcontext -include ppc-regs.h
+endif
 endif
 
 INSTALL_STYLE:=		manual

+ 2 - 2
package/strace/patches/patch-defs_h

@@ -1,5 +1,5 @@
 --- strace-4.8.orig/defs.h	2013-05-14 16:10:42.000000000 +0200
-+++ strace-4.8/defs.h	2013-10-25 13:21:18.000000000 +0200
++++ strace-4.8/defs.h	2014-01-15 12:10:01.000000000 +0100
 @@ -37,6 +37,28 @@
  # endif
  #endif
@@ -42,7 +42,7 @@
  # include <sys/ptrace.h>
  # undef ptrace
 -# ifdef POWERPC
-+# if defined(POWERPC) || defined(ARM)
++# if defined(ARM)
  #  define __KERNEL__
  #  include <asm/ptrace.h>
  #  undef __KERNEL__

+ 1 - 1
package/strace/patches/patch-process_c

@@ -1,5 +1,5 @@
 --- strace-4.8.orig/process.c	2013-05-18 00:22:19.000000000 +0200
-+++ strace-4.8/process.c	2013-10-25 13:17:58.000000000 +0200
++++ strace-4.8/process.c	2014-01-15 12:21:31.000000000 +0100
 @@ -55,19 +55,6 @@
  # endif
  #endif

+ 49 - 0
package/strace/src/ppc-regs.h

@@ -0,0 +1,49 @@
+#define PT_R0 0
+#define PT_R1 1
+#define PT_R2 2
+#define PT_R3 3
+#define PT_R4 4
+#define PT_R5 5
+#define PT_R6 6
+#define PT_R7 7
+#define PT_R8 8
+#define PT_R9 9
+#define PT_R10 10
+#define PT_R11 11
+#define PT_R12 12
+#define PT_R13 13
+#define PT_R14 14
+#define PT_R15 15
+#define PT_R16 16
+#define PT_R17 17
+#define PT_R18 18
+#define PT_R19 19
+#define PT_R20 20
+#define PT_R21 21
+#define PT_R22 22
+#define PT_R23 23
+#define PT_R24 24
+#define PT_R25 25
+#define PT_R26 26
+#define PT_R27 27
+#define PT_R27 27
+#define PT_R28 28
+#define PT_R29 29
+#define PT_R30 30
+#define PT_R31 31
+#define PT_NIP 32
+#define PT_MSR 33
+#define PT_ORIG_R3 34
+#define PT_CTR 35
+#define PT_LNK 36
+#define PT_XER 37
+#define PT_CCR 38
+#define PT_MQ 39
+#define PT_TRAP 40
+#define PT_DAR 41
+#define PT_DSISR 42
+#define PT_RESULT 43
+#define PT_REGS_COUNT 44
+#define PT_FPR0 48
+#define PT_FPR31 (PT_FPR0 + 2*31)
+#define PT_FPSCR (PT_FPR0 + 2*32 + 1)