mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-19 03:06:42 +00:00
Fix breakage from sed_r change in some auxiliary scripts
... do not overquote the variables from paths.sh. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
2d1b469f88
commit
5ea3f2967f
@ -73,7 +73,7 @@ addToolVersion() {
|
||||
|
||||
[ -f "${file}" ] || return 0
|
||||
|
||||
v=$(echo "${version}" |"${sed_r}" -e 's/-/_/g; s/\./_/g;')
|
||||
v=$(echo "${version}" |${sed_r} -e 's/-/_/g; s/\./_/g;')
|
||||
|
||||
config_ver_option="${cat}_V_${v}"
|
||||
|
||||
|
@ -59,7 +59,7 @@ for p in "${src}/"*.patch*; do
|
||||
newname="$(printf "%03d-%s" \
|
||||
"${cpt}" \
|
||||
"$( basename "${p}" \
|
||||
|"${sed_r}" -e 's/^[[:digit:]]+[-_]//' \
|
||||
|${sed_r} -e 's/^[[:digit:]]+[-_]//' \
|
||||
-e "${sed_re}" \
|
||||
)" \
|
||||
)"
|
||||
|
@ -15,19 +15,19 @@ awk="@@CT_awk@@"
|
||||
CT_PREFIX_DIR="$(cd "$(dirname "$0")/.."; pwd)"
|
||||
CT_GCC="${0%-populate}-gcc"
|
||||
CT_READELF="${0%-populate}-readelf"
|
||||
CT_CFG_PREFIX_DIR="$("${CT_GCC}" -v 2>&1 \
|
||||
CT_CFG_PREFIX_DIR="$(${CT_GCC} -v 2>&1 \
|
||||
|tr ' ' '\n' \
|
||||
|"${grep}" -E -- '--prefix=' \
|
||||
|${grep} -E -- '--prefix=' \
|
||||
|cut -d = -f 2-
|
||||
)"
|
||||
CT_CFG_SYSROOT_DIR="$("${CT_GCC}" -v 2>&1 \
|
||||
|tr ' ' '\n' \
|
||||
|"${grep}" -E -- '--with-sysroot=' \
|
||||
CT_CFG_SYSROOT_DIR="$(${CT_GCC} -v 2>&1 \
|
||||
|tr ' ' '\n' \
|
||||
|${grep} -E -- '--with-sysroot=' \
|
||||
|cut -d = -f 2-
|
||||
)"
|
||||
CT_SYSROOT_DIR="$(printf "${CT_CFG_SYSROOT_DIR}\n" \
|
||||
|"${sed_r}" -e "s:^${CT_CFG_PREFIX_DIR}:${CT_PREFIX_DIR}:;" \
|
||||
|"${sed_r}" -e 's,/+,/,g;' \
|
||||
CT_SYSROOT_DIR="$(printf "${CT_CFG_SYSROOT_DIR}\n" \
|
||||
|${sed_r} -e "s:^${CT_CFG_PREFIX_DIR}:${CT_PREFIX_DIR}:;" \
|
||||
-e 's,/+,/,g;' \
|
||||
)"
|
||||
|
||||
myname=$(basename "$0")
|
||||
@ -198,9 +198,9 @@ do_add_lib() {
|
||||
${CT_PRINTF} ": '%s'\n" "${libfile}"
|
||||
if [ -e "${libfile}" ]; then
|
||||
mkdir -p "${dir}"
|
||||
true_libname=$("${CT_READELF}" -d "${libfile}" \
|
||||
|"${grep}" "Library soname:" \
|
||||
|"${sed_r}" -e 's,.+\[(.+)\] *$,\1,;' \
|
||||
true_libname=$("${CT_READELF}" -d "${libfile}" \
|
||||
|${grep} "Library soname:" \
|
||||
|${sed_r} -e 's,.+\[(.+)\] *$,\1,;' \
|
||||
)
|
||||
case "${libfile}" in
|
||||
*/ld*) mode=0755;;
|
||||
@ -225,9 +225,9 @@ do_resolve_deps() {
|
||||
local file="${1}"
|
||||
local libname
|
||||
|
||||
for libname in $("${CT_READELF}" -d "${file}" \
|
||||
|"${grep}" -E '\(NEEDED\)[[:space:]]+Shared library:' \
|
||||
|"${sed_r}" -e 's,.+\[(.+)\] *$,\1,;' \
|
||||
for libname in $("${CT_READELF}" -d "${file}" \
|
||||
|${grep} -E '\(NEEDED\)[[:space:]]+Shared library:' \
|
||||
|${sed_r} -e 's,.+\[(.+)\] *$,\1,;' \
|
||||
); do
|
||||
[ -n "${libname}" ] || continue
|
||||
${CT_PRINTF} "Searching for '%s' needed by '%s'\n" "${libname}" "${file}"
|
||||
@ -244,15 +244,15 @@ cd "${CT_ROOT_DST_DIR}"
|
||||
# First of, copy the forced libraries into the working copy
|
||||
lib_list=
|
||||
if [ -n "${CT_LIB_FILE}" ]; then
|
||||
lib_list=$("${sed_r}" -e ':loop; s/#.*//;' \
|
||||
-e 's/[[:space:]]+//g;' \
|
||||
-e 's/([^:])$/\1:/;' \
|
||||
-e '/$/N; s/\n//; tloop;' \
|
||||
lib_list=$(${sed_r} -e ':loop; s/#.*//;' \
|
||||
-e 's/[[:space:]]+//g;' \
|
||||
-e 's/([^:])$/\1:/;' \
|
||||
-e '/$/N; s/\n//; tloop;' \
|
||||
"${CT_LIB_FILE}"
|
||||
)
|
||||
fi
|
||||
CT_LIB_LIST=$(printf "${CT_LIB_LIST}:${lib_list}\n" \
|
||||
|"${sed_r}" -e 's/^:+//; s/:+$//; s/:+/ /g;' \
|
||||
|${sed_r} -e 's/^:+//; s/:+$//; s/:+/ /g;' \
|
||||
)
|
||||
if [ -n "${CT_LIB_LIST}" ]; then
|
||||
for name in ${CT_LIB_LIST}; do
|
||||
@ -283,7 +283,7 @@ trap "rm -rf ${CT_TMP_DIR}" EXIT
|
||||
|
||||
# List all ELF (executables|shared objects)...
|
||||
find . -type f -exec file {} \; \
|
||||
|"${grep}" -E ': ELF [[:digit:]]+-bit (L|M)SB +(executable|shared object),' \
|
||||
|${grep} -E ': ELF [[:digit:]]+-bit (L|M)SB +(executable|shared object),' \
|
||||
|cut -d ":" -f 1 \
|
||||
>"${CT_TMP_DIR}/files.list"
|
||||
|
||||
|
@ -75,7 +75,7 @@ fi
|
||||
if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then
|
||||
# We save the file, and then point the saved sample to this file
|
||||
CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${samp_dir}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
|
||||
"${sed_r}" -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
|
||||
${sed_r} -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE)=.+$|\1="'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
|
||||
.defconfig
|
||||
else
|
||||
# remove any dangling files
|
||||
|
@ -258,9 +258,9 @@ do_process_file() {
|
||||
do_trace "Parsing file '%s'\n" "${file}"
|
||||
|
||||
save_search_rpath=( "${search_rpath[@]}" )
|
||||
for n in $( "${readelf}" -d "${file}" \
|
||||
|"${grep}" -E '\((RPATH|RUNPATH)\)' \
|
||||
|"${sed_r}" -e 's/^.*Library r(|un)path:[[:space:]]+\[(.*)\]$/\2/;'\
|
||||
for n in $( ${readelf} -d "${file}" \
|
||||
|${grep} -E '\((RPATH|RUNPATH)\)' \
|
||||
|${sed_r} -e 's/^.*Library r(|un)path:[[:space:]]+\[(.*)\]$/\2/;'\
|
||||
); do
|
||||
do_trace "-> adding rpath '%s'\n" "${n}"
|
||||
search_rpath+=( "${n}" )
|
||||
@ -271,9 +271,9 @@ do_process_file() {
|
||||
done
|
||||
do_trace ": end search path\n"
|
||||
|
||||
for n in $( "${readelf}" -d "${file}" \
|
||||
|"${grep}" -E '\(NEEDED\)' \
|
||||
|"${sed_r}" -e 's/^.*Shared library:[[:space:]]+\[([^]]+)\].*/\1/;' \
|
||||
for n in $( ${readelf} -d "${file}" \
|
||||
|${grep} -E '\(NEEDED\)' \
|
||||
|${sed_r} -e 's/^.*Shared library:[[:space:]]+\[([^]]+)\].*/\1/;' \
|
||||
); do
|
||||
found=0
|
||||
for m in "${needed_list[@]}"; do
|
||||
|
Loading…
Reference in New Issue
Block a user