diff options
author | Alexey Neyman <stilor@att.net> | 2017-04-01 10:12:05 -0700 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2017-04-01 10:12:05 -0700 |
commit | d6bf8e2d9866c6c3618e5053aca01df7fe7d61d0 (patch) | |
tree | cd27410ed6cc009a730ffd59efc399c5002c32ca /scripts/functions | |
parent | 88d28e6eed547e9992c44c6894764dd7b000b980 (diff) | |
download | crosstool-ng-d6bf8e2d9866c6c3618e5053aca01df7fe7d61d0.tar.gz crosstool-ng-d6bf8e2d9866c6c3618e5053aca01df7fe7d61d0.tar.bz2 crosstool-ng-d6bf8e2d9866c6c3618e5053aca01df7fe7d61d0.zip |
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 <stilor@att.net>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 6 |
1 files changed, 5 insertions, 1 deletions
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 |