commit 54a72b609b9caf176d8ceb7eea4c0d4bd341ba2f
parent 87ad99d0569ac7cf17e61688124b05de4f85e48b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 17 Jul 2014 15:44:44 +0000
strace: crosscompile + arm patch
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
Diffstat:
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/strace/mkfile b/strace/mkfile
@@ -8,4 +8,5 @@ mkfile = ../strace.mk
# shamelessly borrowed from sabotage
patches = \
../strace-musl.patch \
- ../strace-kernelhdr_3.12.6.patch
+ ../strace-kernelhdr_3.12.6.patch \
+ ../strace-arm_process.patch
diff --git a/strace/strace-arm_process.patch b/strace/strace-arm_process.patch
@@ -0,0 +1,13 @@
+--- strace-4.8.org/process.c
++++ strace-4.8/process.c
+@@ -91,6 +91,10 @@
+ # include <asm/rse.h>
+ #endif
+
++#ifdef __arm__
++#include <asm/ptrace.h>
++#endif
++
+ #ifdef HAVE_PRCTL
+ # include <sys/prctl.h>
+
diff --git a/strace/strace.mk b/strace/strace.mk
@@ -15,7 +15,12 @@ strace:QV:
# remove sys/sysinfo.h include.
find -name "*.[ch]" -exec sed 's@#include <sys/sysinfo.h>@@g' -i {} \;
export CFLAGS="$CFLAGS -Dsigcontext_struct=sigcontext"
+ # NOTE: --host is set to TOOLCHAIN_TRIPLET (not HOST_TOOLCHAIN_TRIPLET)
+ # because asm include bits per arch are needed.
+ # --build is not defined because --build should be != --host in
+ # configure.
CC="$CC" ./configure \
+ --host="${TOOLCHAIN_TRIPLET}" \
--prefix="$PREFIX" \
--mandir="$ROOT/share/man" \
--disable-shared \