From d6bf8e2d9866c6c3618e5053aca01df7fe7d61d0 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 1 Apr 2017 10:12:05 -0700 Subject: Fix symlinking to multiarch tools on Cygwin On cygwin, creating both "foo.exe" and "foo" results in 'ln -sf' returning an error ("File exists"). However, ln silently removes the "foo.exe" in this case, so an attempt to re-run the same command manually then succeeds. Hence, make binutils.sh also create symlinks with .exe prefix, using the new & shiny routine. Signed-off-by: Alexey Neyman --- scripts/functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index 0ba96b48..2bc2dacd 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1784,7 +1784,11 @@ CT_SymlinkTools() CT_Pushd "${srcdir}" for t in "${CT_TARGET}-"*; do - if [ -n "${newpfx}" -a "${newpfx}" != "${CT_TARGET}" ]; then + if [ "${t}" = "${CT_TARGET}-*" ]; then + # No matching files + break + fi + if [ "${newpfx}" != "${CT_TARGET}" -o "${bindir}" != "${srcdir}" ]; then _t="${newpfx}-${t#${CT_TARGET}-}" CT_DoExecLog ALL ln -sfv "${dirpfx}${t}" "${bindir}/${_t}" fi -- cgit v1.2.3