summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-02-13 02:53:23 (GMT)
committerAlexey Neyman <stilor@att.net>2017-02-14 06:47:40 (GMT)
commit7bcf18bfab84374d3305c7a088f95ac1219ddf93 (patch)
tree49c67ed5fb9729ef554c3a07a916612af5139e24 /scripts/crosstool-NG.sh.in
parentfbc69323085e2370faeb8b46291cd66cbf9ef649 (diff)
Determine whether -E/-r option selects extended regexp
... and then use the right option. See the note in scripts/functions on where we should use ${foo} and where just 'foo'; this boils down to whether we can expect the build tools override to be in effect (e.g. in the actual build scripts) or not (i.e. outside of scripts/build). While running in scripts/functions, or in scripts/crosstool-NG.sh the build tools override directory (.build/tools/bin) may have not been set up (yet, or at all). Also, modify the installed scripts (populate, xldd) accordingly. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r--scripts/crosstool-NG.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index b39dee4..7145403 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -117,7 +117,7 @@ cat "${CT_LIB_DIR}/paths.sh" |while read trash line; do
fi
CT_DoLog DEBUG "Creating script-override for '${tool}' -> '${path}' using '${tmpl}' template"
CT_DoExecLog ALL cp "${tmpl}" "${CT_TOOLS_OVERRIDE_DIR}/bin/${tool}"
- CT_DoExecLog ALL ${sed} -i -r \
+ CT_DoExecLog ALL ${sed_r} -i \
-e "s#@CONFIG_SHELL@#${CT_CONFIG_SHELL}#g" \
-e "s#@TOOL_PATH@#${path}#g" \
-e "s#@TOOLS_OVERRIDE_DIR@#${CT_TOOLS_OVERRIDE_DIR}#g" \
@@ -148,7 +148,7 @@ CT_DoLog INFO "Building environment variables"
CT_TestAndAbort "'CT_PREFIX_DIR' is not set: where should I install?" -z "${CT_PREFIX_DIR}"
# Avoid multiple '/' in the prefix dir, it breaks relocatability
-CT_PREFIX_DIR="$( "${sed}" -r -e 's:/+:/:g; s:/*$::;' <<<"${CT_PREFIX_DIR}" )"
+CT_PREFIX_DIR="$( ${sed_r} -e 's:/+:/:g; s:/*$::;' <<<"${CT_PREFIX_DIR}" )"
# Second kludge: merge user-supplied target CFLAGS with architecture-provided
# target CFLAGS. Do the same for LDFLAGS in case it happens in the future.