Partially revert 6f8e89cb5c.

The referenced commit replaced 'make' with '${make}' everywhere. This is
wrong for at least the utilities that we may build as companion tools
(make, libtool): this will always invoke the version detected by configure
by supplying the absolute path. In other words, the wrappers in
.build/tools/bin are not fallbacks - they are either temporary (in case
a respective companion tool is built) or permanent redirectors.

This is the reason why the PATH= has .build/*/buildtools/bin at higher
precedence than .build/tools/bin; the latter has the versions detected by
configure and the former has the versions built as companion tools.

Revert the rest of the gang (grep/sed/...) for consistency. After all,
we may decide to supply some of them as well (awk, for instance).

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman
2016-11-20 23:50:17 -08:00
parent 6cb9e62f6c
commit 488b27f58b
34 changed files with 186 additions and 186 deletions

View File

@ -8,8 +8,8 @@ do_binutils_get() {
CT_GetCustom "binutils" "${CT_BINUTILS_CUSTOM_VERSION}" \
"${CT_BINUTILS_CUSTOM_LOCATION}"
else
if echo ${CT_BINUTILS_VERSION} |${grep} -q linaro; then
YYMM=`echo ${CT_BINUTILS_VERSION} |cut -d- -f3 |${sed} -e 's,^..,,'`
if echo ${CT_BINUTILS_VERSION} |grep -q linaro; then
YYMM=`echo ${CT_BINUTILS_VERSION} |cut -d- -f3 |sed -e 's,^..,,'`
CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \
https://releases.linaro.org/${YYMM}/components/toolchain/binutils-linaro \
http://cbuild.validation.linaro.org/snapshots
@ -230,14 +230,14 @@ do_binutils_backend() {
if [ "${static_build}" = "y" ]; then
extra_make_flags+=("LDFLAGS=${ldflags} -all-static")
CT_DoLog EXTRA "Prepare binutils for static build"
CT_DoExecLog ALL ${make} ${JOBSFLAGS} configure-host
CT_DoExecLog ALL make ${JOBSFLAGS} configure-host
fi
CT_DoLog EXTRA "Building binutils"
CT_DoExecLog ALL ${make} "${extra_make_flags[@]}" ${JOBSFLAGS}
CT_DoExecLog ALL make "${extra_make_flags[@]}" ${JOBSFLAGS}
CT_DoLog EXTRA "Installing binutils"
CT_DoExecLog ALL ${make} install
CT_DoExecLog ALL make install
if [ "${build_manuals}" = "y" ]; then
CT_DoLog EXTRA "Building and installing the binutils manuals"
@ -247,8 +247,8 @@ do_binutils_backend() {
fi
manuals_install=( "${manuals_for[@]/\#/install-pdf-}" )
manuals_install+=( "${manuals_for[@]/\#/install-html-}" )
CT_DoExecLog ALL ${make} ${JOBSFLAGS} pdf html
CT_DoExecLog ALL ${make} "${manuals_install[@]}"
CT_DoExecLog ALL make ${JOBSFLAGS} pdf html
CT_DoExecLog ALL make "${manuals_install[@]}"
fi
# Install the wrapper if needed
@ -256,7 +256,7 @@ do_binutils_backend() {
CT_DoLog EXTRA "Installing ld wrapper"
rm -f "${prefix}/bin/${CT_TARGET}-ld"
rm -f "${prefix}/${CT_TARGET}/bin/ld"
${sed} -r -e "s/@@DEFAULT_LD@@/${CT_BINUTILS_LINKER_DEFAULT}/" \
sed -r -e "s/@@DEFAULT_LD@@/${CT_BINUTILS_LINKER_DEFAULT}/" \
"${CT_LIB_DIR}/scripts/build/binutils/binutils-ld.in" \
>"${prefix}/bin/${CT_TARGET}-ld"
chmod +x "${prefix}/bin/${CT_TARGET}-ld"
@ -314,10 +314,10 @@ do_elf2flt_backend() {
"${CT_ELF2FLT_EXTRA_CONFIG_ARRAY[@]}"
CT_DoLog EXTRA "Building elf2flt"
CT_DoExecLog ALL ${make} ${JOBSFLAGS}
CT_DoExecLog ALL make ${JOBSFLAGS}
CT_DoLog EXTRA "Installing elf2flt"
CT_DoExecLog ALL ${make} install
CT_DoExecLog ALL make install
}
# Now on for the target libraries
@ -372,9 +372,9 @@ do_binutils_for_target() {
"${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
CT_DoLog EXTRA "Building binutils' libraries (${targets[*]}) for target"
CT_DoExecLog ALL ${make} ${JOBSFLAGS} "${build_targets[@]}"
CT_DoExecLog ALL make ${JOBSFLAGS} "${build_targets[@]}"
CT_DoLog EXTRA "Installing binutils' libraries (${targets[*]}) for target"
CT_DoExecLog ALL ${make} DESTDIR="${CT_SYSROOT_DIR}" "${install_targets[@]}"
CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" "${install_targets[@]}"
CT_Popd
CT_EndStep