summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-02-27 14:34:30 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-02-27 14:34:30 (GMT)
commitae2ca9a8d8063c2a1906ec3219f0c70008613a08 (patch)
tree7cceef74d21dd3ae29903882ffc8dff176df1218
parentb37efbd994d5505ee9c27a1c82688ac8d2b8b101 (diff)
binutils/sstrip: build statically for static toolchains
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
-rw-r--r--scripts/build/binutils/sstrip.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/build/binutils/sstrip.sh b/scripts/build/binutils/sstrip.sh
index b0dcde4..4653495 100644
--- a/scripts/build/binutils/sstrip.sh
+++ b/scripts/build/binutils/sstrip.sh
@@ -20,12 +20,17 @@ if [ "${CT_SSTRIP}" = "y" ]; then
}
do_sstrip() {
+ local sstrip_cflags
CT_DoStep INFO "Installing sstrip"
mkdir -p "${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_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_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"