summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBryan Hundven" <bryanhundven@gmail.com>2010-12-09 17:55:33 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2010-12-09 17:55:33 (GMT)
commitbf3c89ebb5c39410f52cd81e0c19bb58b59dc3e9 (patch)
tree693ddbd57687e8989a5c31827888f0c05a32e470 /scripts
parentc10e06ed81a7afb628aff6d9f4e6762fc8386c52 (diff)
binutils/binutils: build statically
If the global static option is set, then build binutils statically. Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/binutils/binutils.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
index 57d35a5..9f55c4d 100644
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -18,6 +18,7 @@ do_binutils_extract() {
# Build binutils
do_binutils() {
local -a extra_config
+ local -a extra_make_flags
mkdir -p "${CT_BUILD_DIR}/build-binutils"
cd "${CT_BUILD_DIR}/build-binutils"
@@ -40,8 +41,14 @@ do_binutils() {
${CT_BINUTILS_EXTRA_CONFIG} \
${BINUTILS_SYSROOT_ARG}
+ if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
+ extra_make_flags+=("LDFLAGS=-all-static")
+ CT_DoLog EXTRA "Prepare binutils for static build"
+ CT_DoExecLog ALL make configure-host
+ fi
+
CT_DoLog EXTRA "Building binutils"
- CT_DoExecLog ALL make ${PARALLELMFLAGS}
+ CT_DoExecLog ALL make "${extra_make_flags[@]}" ${PARALLELMFLAGS}
CT_DoLog EXTRA "Installing binutils"
CT_DoExecLog ALL make install