strace/build_static_example.sh
Denys Vlasenko 6e5f5b3adb Add example script which builds static (possibly cross-compiled) strace
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-22 15:59:01 +01:00

21 lines
429 B
Bash
Executable File

#!/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"