mirror of
https://github.com/frida/tinycc
synced 2025-02-26 04:04:35 +03:00
build: win32: don't use mklink - use ln or fallback to cp
For the following reasons: - Native windows links are rarely used in general. - Require elevated privileges even if the current user has administrator privileges (needs further "run as administrator"). - Most/all windows shell environments capable of running configure already support ln (msys[1], msys2, most probably cygwin too). - If cross building tcc on linux for windows then native mklink is not available, as well as 'cmd' (in this scenario the build later fails for other reasons, but at least configures succeeds now). - cp is good enough as fallback since we only copy 5 makefiles anyway. - The only environment I'm aware of which doesn't support ln -s is busybox for windows, and with this patch it falls back to cp and completes configure successfully (and the build later succeeds, assuming valid $CC and $AR).
This commit is contained in:
parent
71b16f4e18
commit
61894e17cd
7
configure
vendored
7
configure
vendored
@ -551,11 +551,8 @@ fn_makelink()
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
if test "$mingw32" = "yes" ; then
|
||||
cmd //c mklink `echo "$2 $tgt" | sed 's,/,\\\\,g'`
|
||||
else
|
||||
ln -sfn $tgt $2
|
||||
fi
|
||||
|
||||
ln -sfn $tgt $2 || ( echo "ln failed. Using cp instead."; cp -f $1/$2 $2 )
|
||||
}
|
||||
|
||||
if test "$source_path_used" = "yes" ; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user