binutils/sstrip: build statically for static toolchains

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
Yann E. MORIN" 2011-02-27 15:34:30 +01:00
parent b37efbd994
commit ae2ca9a8d8

View File

@ -20,12 +20,17 @@ if [ "${CT_SSTRIP}" = "y" ]; then
} }
do_sstrip() { do_sstrip() {
local sstrip_cflags
CT_DoStep INFO "Installing sstrip" CT_DoStep INFO "Installing sstrip"
mkdir -p "${CT_BUILD_DIR}/build-sstrip" mkdir -p "${CT_BUILD_DIR}/build-sstrip"
cd "${CT_BUILD_DIR}/build-sstrip" cd "${CT_BUILD_DIR}/build-sstrip"
if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
sstrip_cflags="-static"
fi
CT_DoLog EXTRA "Building sstrip" CT_DoLog EXTRA "Building sstrip"
CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c" CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall ${sstrip_cflags} -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
CT_DoLog EXTRA "Installing sstrip" CT_DoLog EXTRA "Installing sstrip"
CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip" CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"