strace/build_static_example.sh
Dmitry V. Levin 3e69bdf41a Use bootstrap script consistently
Now that ./xlat/gen.sh has to be run before autoreconf,
replace all autoreconf calls with ./bootstrap call.

* bootstrap: Forward arguments to autoreconf.
* build_static_example.sh: Replace autoreconf call with bootstrap call.
* make-dist: Likewise.
* qemu_multiarch_testing/README: Likewise.
2014-05-30 21:31:08 +00:00

30 lines
746 B
Bash
Executable File

#!/bin/sh -e
BUILDFLAG=""
#BUILDFLAG="--build=i686"
#export CC="i686-gcc"
# -mpreferred-stack-boundary=2 can be used to prevent gcc 4.2.x
# from aligning stack to 16 bytes. (Which is gcc's way of supporting SSE).
# For me it saves about 6k of text segment.
# This may be unsafe if your libc expects 16 byte stack alignment
# on function entry.
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\
"
./bootstrap
./configure $BUILDFLAG #--enable-maintainer-mode
make CC="$CC" CFLAGS="$CFLAGS"