浏览代码

fix musl on mips compile of strace

Waldemar Brodkorb 12 年之前
父节点
当前提交
88877b78c8
共有 3 个文件被更改,包括 42 次插入3 次删除
  1. 2 1
      package/strace/Makefile
  2. 10 2
      package/strace/patches/patch-signal_c
  3. 30 0
      package/strace/src/sgidefs.h

+ 2 - 1
package/strace/Makefile

@@ -5,10 +5,11 @@ include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		strace
 PKG_VERSION:=		4.8
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_MD5SUM:=		c575ef43829586801f514fd91bfe7575
 PKG_DESCR:=		System call trace program
 PKG_SECTION:=		debug
+PKG_DEPENDS:=		libgcc
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=strace/}
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz

+ 10 - 2
package/strace/patches/patch-signal_c

@@ -1,6 +1,14 @@
 --- strace-4.8.orig/signal.c	2013-05-23 15:41:23.000000000 +0200
-+++ strace-4.8/signal.c	2013-08-14 08:50:16.000000000 +0200
-@@ -815,7 +815,7 @@ sys_sigreturn(struct tcb *tcp)
++++ strace-4.8/signal.c	2013-09-13 16:20:20.000000000 +0200
+@@ -61,6 +61,7 @@
+ #endif
+ 
+ #if defined(SPARC) || defined(SPARC64) || defined(MIPS)
++#include <asm/ptrace.h>
+ typedef struct {
+ 	struct pt_regs		si_regs;
+ 	int			si_mask;
+@@ -815,7 +816,7 @@ sys_sigreturn(struct tcb *tcp)
  {
  #if defined(ARM)
  	if (entering(tcp)) {

+ 30 - 0
package/strace/src/sgidefs.h

@@ -0,0 +1,30 @@
+#ifndef _SGIDEFS_H
+#define _SGIDEFS_H
+
+/* MIPS ABI crap that GLIBC puts into /include
+by default, and GDB depends on it happily. */
+
+#define _MIPS_ISA_MIPS1 1
+#define _MIPS_ISA_MIPS2 2
+#define _MIPS_ISA_MIPS3 3
+#define _MIPS_ISA_MIPS4 4
+#define _MIPS_ISA_MIPS5 5
+#define _MIPS_ISA_MIPS32 6
+#define _MIPS_ISA_MIPS64 7
+
+#ifndef _ABIO32
+#define _ABIO32 1
+#endif
+#define _MIPS_SIM_ABI32 _ABIO32
+
+#ifndef _ABIN32
+#define _ABIN32 2
+#endif
+#define _MIPS_SIM_NABI32 _ABIN32
+
+#ifndef _ABI64
+#define _ABI64 3
+#endif
+#define _MIPS_SIM_ABI64 _ABI64
+
+#endif