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>
This commit is contained in:
Bryan Hundven 2015-12-07 11:21:34 -08:00
parent c92387e2a8
commit ed21bcaf89

View File

@ -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