mirror of
https://github.com/andrew-d/static-binaries.git
synced 2024-12-25 23:30:54 +08:00
Add strace for arm
This commit is contained in:
parent
828b696b84
commit
2466cc8339
BIN
binaries/linux/arm/strace
Executable file
BIN
binaries/linux/arm/strace
Executable file
Binary file not shown.
8
strace/arm/Dockerfile
Normal file
8
strace/arm/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM andrewd/musl-cross-arm
|
||||
MAINTAINER Andrew Dunham <andrew@du.nham.ca>
|
||||
|
||||
# Add our build script
|
||||
ADD . /build/
|
||||
|
||||
# This builds the program and copies it to /output
|
||||
CMD /build/build.sh
|
47
strace/arm/build.sh
Executable file
47
strace/arm/build.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
set -x
|
||||
|
||||
|
||||
STRACE_VERSION=4.10
|
||||
|
||||
|
||||
function build_strace() {
|
||||
cd /build
|
||||
|
||||
# Download
|
||||
curl -LO http://downloads.sourceforge.net/project/strace/strace/${STRACE_VERSION}/strace-${STRACE_VERSION}.tar.xz
|
||||
tar xJvf strace-${STRACE_VERSION}.tar.xz
|
||||
cd strace-${STRACE_VERSION}
|
||||
|
||||
# Add missing headers.
|
||||
patch -p2 < /build/strace.patch
|
||||
|
||||
# Set up path
|
||||
export PATH=$PATH:/opt/cross/arm-linux-musleabihf/bin/
|
||||
|
||||
# Build
|
||||
CC='arm-linux-musleabihf-gcc -static -frandom-seed=build-strace-arm' \
|
||||
./configure --host=arm-linux
|
||||
make
|
||||
arm-linux-musleabihf-strip strace
|
||||
}
|
||||
|
||||
function doit() {
|
||||
build_strace
|
||||
|
||||
# Copy to output
|
||||
if [ -d /output ]
|
||||
then
|
||||
OUT_DIR=/output/`uname | tr 'A-Z' 'a-z'`/arm
|
||||
mkdir -p $OUT_DIR
|
||||
cp /build/strace-${STRACE_VERSION}/strace $OUT_DIR/
|
||||
echo "** Finished **"
|
||||
else
|
||||
echo "** /output does not exist **"
|
||||
fi
|
||||
}
|
||||
|
||||
doit
|
13
strace/arm/strace.patch
Normal file
13
strace/arm/strace.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git 1/strace-4.10-orig/defs.h 2/strace-4.10/defs.h
|
||||
index dad4fe8..d1378ab 100644
|
||||
--- 1/strace-4.10-orig/defs.h
|
||||
+++ 2/strace-4.10/defs.h
|
||||
@@ -54,6 +54,8 @@
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/syscall.h>
|
||||
+#include <asm-generic/ioctl.h>
|
||||
+#include <linux/stat.h>
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
const char *strerror(int);
|
Loading…
x
Reference in New Issue
Block a user