summaryrefslogtreecommitdiff
path: root/scripts/build/binutils/binutils.sh
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-12-07 19:21:34 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-12-07 19:21:34 (GMT)
commited21bcaf8995aa5aad0a9631062ca5e1708e6bdc (patch)
tree0b8ddc5545c4ccdb5f9085e3e80f6200eb13dcaf /scripts/build/binutils/binutils.sh
parentc92387e2a8e2798fde3cfa0143d7a16b4d6630c6 (diff)
binutils: Fix LDFLAGS for static toolchain
If building a static toolchain, the ldflags option passed to do_binutils_backend is overridden when we set `LDFLAGS=-all-static`. We should pass `LDFLAGS=${ldflags} -all-static` in this case. This fixes #297 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'scripts/build/binutils/binutils.sh')
-rw-r--r--scripts/build/binutils/binutils.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
index b3ea88e..afb797d 100644
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -235,7 +235,7 @@ do_binutils_backend() {
"${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
if [ "${static_build}" = "y" ]; then
- extra_make_flags+=("LDFLAGS=-all-static")
+ extra_make_flags+=("LDFLAGS=${ldflags} -all-static")
CT_DoLog EXTRA "Prepare binutils for static build"
CT_DoExecLog ALL ${make} ${JOBSFLAGS} configure-host
fi