summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-07-12 21:52:24 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-07-12 21:52:24 (GMT)
commit151ec4a0df72afaa5502a6ef32844e8dcc85c561 (patch)
treea957cb643f9759f9f71f87621635e3f87edd4569
parent7ddae7f671b8d20892c997c0fee1fc4c5920f5a7 (diff)
scripts, cc/gcc: do not fail on existing symlinks or build.log
If the user builds a toolchain over an existing one, so, without removing CT_PREFIX_DIR, the build fails as the symlinks already exist, as does the build.log. This can also happen (for build.log) if the user first ran in download- or extract-only. Patch (with no SoB) originally from: Phil Wilshire <phil.wilshire@overturenetworks.com> Modified by me as it did not apply cleanly. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from 1ebc2248cc60230cd53ff94ae8f8f1e3261461a3)
-rw-r--r--scripts/build/cc/gcc.sh4
-rw-r--r--scripts/build/internals.sh4
-rw-r--r--scripts/crosstool-NG.sh.in2
3 files changed, 5 insertions, 5 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 8a88342..89cc8e7 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -354,7 +354,7 @@ do_cc_core() {
# check whether compiler has an extension
file="$( ls -1 "${core_prefix_dir}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
[ -z "${file}" ] || ext=".${file##*.}"
- CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc${ext}" "${core_prefix_dir}/bin/${CT_TARGET}-cc${ext}"
+ CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${core_prefix_dir}/bin/${CT_TARGET}-cc${ext}"
CT_EndStep
}
@@ -569,7 +569,7 @@ do_cc() {
# check whether compiler has an extension
file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
[ -z "${file}" ] || ext=".${file##*.}"
- CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}"
+ CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}"
CT_EndStep
}
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
index ab297ad..e368205 100644
--- a/scripts/build/internals.sh
+++ b/scripts/build/internals.sh
@@ -86,14 +86,14 @@ do_finish() {
for t in "${CT_TARGET}-"*; do
if [ -n "${CT_TARGET_ALIAS}" ]; then
_t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
- CT_DoExecLog ALL ln -sv "${t}" "${_t}"
+ CT_DoExecLog ALL ln -sfv "${t}" "${_t}"
fi
if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
_t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
if [ "${_t}" = "${t}" ]; then
CT_DoLog WARN "The sed expression '${CT_TARGET_ALIAS_SED_EXPR}' has no effect on '${t}'"
else
- CT_DoExecLog ALL ln -sv "${t}" "${_t}"
+ CT_DoExecLog ALL ln -sfv "${t}" "${_t}"
fi
fi
done
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 975024a..eb2fbfe 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -597,7 +597,7 @@ CT_DoEnd INFO
# moment... Consign all ouptut to oblivion...
CT_DoLog INFO "Finishing installation (may take a few seconds)..."
exec >/dev/null 2>&1
-
+rm -f ${CT_PREFIX_DIR}/build.log.bz2
if [ "${CT_LOG_TO_FILE}" = "y" ]; then
cp "${tmp_log_file}" "${CT_PREFIX_DIR}/build.log"
if [ "${CT_LOG_FILE_COMPRESS}" = y ]; then