summaryrefslogtreecommitdiff
path: root/build_static_example.sh
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-03-22 15:59:01 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-03-22 15:59:01 +0100
commit6e5f5b3adbb22301942804a2a08af5048e7a9bca (patch)
tree983a3705993dca7c2b12416075abcd4023b5cd5f /build_static_example.sh
parentc8938e08ad06ae7bf0f50872ddbb0efbe7bf7560 (diff)
downloadstrace-6e5f5b3adbb22301942804a2a08af5048e7a9bca.tar.gz
strace-6e5f5b3adbb22301942804a2a08af5048e7a9bca.tar.bz2
strace-6e5f5b3adbb22301942804a2a08af5048e7a9bca.tar.xz
Add example script which builds static (possibly cross-compiled) strace
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'build_static_example.sh')
-rwxr-xr-xbuild_static_example.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/build_static_example.sh b/build_static_example.sh
new file mode 100755
index 0000000..5e5fb42
--- /dev/null
+++ b/build_static_example.sh
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+
+#export CC="i686-gcc"
+export CC="x86_64-gcc"
+
+export CFLAGS="-Os\
+ -fomit-frame-pointer\
+ -static\
+ -static-libgcc\
+ -ffunction-sections -fdata-sections\
+ -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1\
+ -fno-unwind-tables\
+ -fno-asynchronous-unwind-tables\
+ -Wl,--gc-sections\
+ -Wl,-Map=strace.mapfile\
+"
+
+autoreconf -i -f
+./configure #--enable-maintainer-mode
+make CC="$CC" CFLAGS="$CFLAGS"