summaryrefslogtreecommitdiff
path: root/scripts/build/libc/glibc.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-11-21 07:50:17 (GMT)
committerAlexey Neyman <stilor@att.net>2016-11-21 07:50:17 (GMT)
commit488b27f58bfdb3c9c523448acfa17b51325fec03 (patch)
tree24f799a43b479bc65a61d317d76c6127fc2fa320 /scripts/build/libc/glibc.sh
parent6cb9e62f6cc680935ad1b759018e214582b54550 (diff)
Partially revert 6f8e89cb5ca061e899bf3feaaf3fecf30d366c3e.
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>
Diffstat (limited to 'scripts/build/libc/glibc.sh')
-rw-r--r--scripts/build/libc/glibc.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 5067455..2db69cb 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -11,9 +11,9 @@ do_libc_get() {
CT_GetCustom "glibc" "${CT_LIBC_GLIBC_CUSTOM_VERSION}" \
"${CT_LIBC_GLIBC_CUSTOM_LOCATION}"
else
- if echo ${CT_LIBC_VERSION} |${grep} -q linaro; then
+ if echo ${CT_LIBC_VERSION} |grep -q linaro; then
# Linaro glibc releases come from regular downloads...
- YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |${sed} -e 's,^..,,'`
+ YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |sed -e 's,^..,,'`
CT_GetFile "glibc-${CT_LIBC_VERSION}" \
https://releases.linaro.org/${YYMM}/components/toolchain/glibc-linaro \
http://cbuild.validation.linaro.org/snapshots
@@ -301,7 +301,7 @@ do_libc_backend_once() {
# use the 'install-headers' makefile target to install the
# headers
- CT_DoExecLog ALL ${make} ${JOBSFLAGS} \
+ CT_DoExecLog ALL make ${JOBSFLAGS} \
install_root=${multi_root} \
install-bootstrap-headers=yes \
"${extra_make_args[@]}" \
@@ -354,7 +354,7 @@ do_libc_backend_once() {
# there are a few object files needed to link shared libraries,
# which we build and install by hand
CT_DoExecLog ALL mkdir -p "${startfiles_dir}"
- CT_DoExecLog ALL ${make} ${JOBSFLAGS} \
+ CT_DoExecLog ALL make ${JOBSFLAGS} \
"${extra_make_args[@]}" \
csu/subdir_lib
CT_DoExecLog ALL cp csu/crt1.o csu/crti.o csu/crtn.o \
@@ -375,12 +375,12 @@ do_libc_backend_once() {
if [ "${libc_mode}" = "final" ]; then
CT_DoLog EXTRA "Building C library"
- CT_DoExecLog ALL ${make} ${JOBSFLAGS} \
+ CT_DoExecLog ALL make ${JOBSFLAGS} \
"${extra_make_args[@]}" \
all
CT_DoLog EXTRA "Installing C library"
- CT_DoExecLog ALL ${make} ${JOBSFLAGS} \
+ CT_DoExecLog ALL make ${JOBSFLAGS} \
"${extra_make_args[@]}" \
install_root="${multi_root}" \
install
@@ -392,7 +392,7 @@ do_libc_backend_once() {
CT_DoLog EXTRA "Building and installing the C library manual"
# Omit JOBSFLAGS as GLIBC has problems building the
# manuals in parallel
- CT_DoExecLog ALL ${make} pdf html
+ CT_DoExecLog ALL make pdf html
CT_DoExecLog ALL mkdir -p ${CT_PREFIX_DIR}/share/doc
CT_DoExecLog ALL cp -av ${src_dir}/manual/*.pdf \
${src_dir}/manual/libc \
@@ -411,7 +411,7 @@ do_libc_backend_once() {
do_libc_add_ons_list() {
local sep="$1"
local addons_list="$( echo "${CT_LIBC_ADDONS_LIST}" \
- |${sed} -r -e "s/[[:space:],]/${sep}/g;" \
+ |sed -r -e "s/[[:space:],]/${sep}/g;" \
)"
if [ "${CT_LIBC_GLIBC_2_20_or_later}" != "y" ]; then
case "${CT_THREADS}" in
@@ -421,7 +421,7 @@ do_libc_add_ons_list() {
fi
[ "${CT_LIBC_GLIBC_USE_PORTS}" = "y" ] && addons_list="${addons_list}${sep}ports"
# Remove duplicate, leading and trailing separators
- echo "${addons_list}" |${sed} -r -e "s/${sep}+/${sep}/g; s/^${sep}//; s/${sep}\$//;"
+ echo "${addons_list}" |sed -r -e "s/${sep}+/${sep}/g; s/^${sep}//; s/${sep}\$//;"
}
# Compute up the minimum supported Linux kernel version
@@ -440,7 +440,7 @@ do_libc_min_kernel_config() {
if [ ! -f "${version_code_file}" -o ! -r "${version_code_file}" ]; then
CT_Abort "Linux version is unavailable in installed headers files"
fi
- version_code="$(${grep} -E LINUX_VERSION_CODE "${version_code_file}" \
+ version_code="$(grep -E LINUX_VERSION_CODE "${version_code_file}" \
|cut -d' ' -f 3 \
)"
version=$(((version_code>>16)&0xFF))
@@ -450,7 +450,7 @@ do_libc_min_kernel_config() {
elif [ "${CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN}" = "y" ]; then
# Trim the fourth part of the linux version, keeping only the first three numbers
min_kernel_config="$( echo "${CT_LIBC_GLIBC_MIN_KERNEL_VERSION}" \
- |${sed} -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;' \
+ |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;' \
)"
fi
echo "--enable-kernel=${min_kernel_config}"
@@ -515,7 +515,7 @@ do_libc_locales() {
"${extra_config[@]}"
CT_DoLog EXTRA "Building C library localedef"
- CT_DoExecLog ALL ${make} ${JOBSFLAGS}
+ CT_DoExecLog ALL make ${JOBSFLAGS}
# The target's endianness and uint32_t alignment should be passed as options
# to localedef, but glibc's localedef does not support these options, which
@@ -523,7 +523,7 @@ do_libc_locales() {
# only if it has the same endianness and uint32_t alignment as the host's.
CT_DoLog EXTRA "Installing C library locales"
- CT_DoExecLog ALL ${make} ${JOBSFLAGS} \
+ CT_DoExecLog ALL make ${JOBSFLAGS} \
install_root="${CT_SYSROOT_DIR}" \
localedata/install-locales
}