libelf: Cygwin fix for UNC paths

If destdir was / and prefix began with /
then we would attempt to install libelf
to a path beginning with // which is a
UNC path on Cygwin. This is generally
incorrect.

Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
This commit is contained in:
Ray Donnelly 2015-12-08 23:17:06 +00:00
parent 644522fcd0
commit 24d17220a1

View File

@ -135,6 +135,13 @@ do_libelf_backend() {
CT_DoExecLog ALL ${make}
CT_DoLog EXTRA "Installing libelf"
# Guard against $destdir$prefix == //
# which is a UNC path on Cygwin/MSYS2
if [[ ${destdir} == / ]] && [[ ${prefix} == /* ]]; then
destdir=
fi
CT_DoExecLog ALL ${make} instroot="${destdir}" install
}