Skip to content
Snippets Groups Projects
Commit 6ffbd678 authored by Cheng Shao's avatar Cheng Shao :beach: Committed by Marge Bot
Browse files

autoconf: normalize paths of some build-time dependencies on Windows

This commit applies path normalization via cygpath -m to some
build-time dependencies on Windows. Without this logic, the
/clang64/bin prefixed msys2-style paths cause the build to fail with
--enable-distro-toolchain.
parent accc8c33
No related branches found
No related tags found
No related merge requests found
......@@ -314,6 +314,8 @@ else
AC_CHECK_TARGET_TOOL([WindresCmd],[windres])
AC_CHECK_TARGET_TOOL([OBJDUMP],[objdump])
WindresCmd="$(cygpath -m $WindresCmd)"
if test "$Genlib" != ""; then
GenlibCmd="$(cygpath -m $Genlib)"
fi
......@@ -464,7 +466,12 @@ case $HostOS_CPP in
;;
esac
ObjdumpCmd="$OBJDUMP"
if test "$HostOS" = "mingw32"
then
ObjdumpCmd=$(cygpath -m "$OBJDUMP")
else
ObjdumpCmd="$OBJDUMP"
fi
AC_SUBST([ObjdumpCmd])
dnl ** Which ranlib to use?
......@@ -473,7 +480,12 @@ AC_PROG_RANLIB
if test "$RANLIB" = ":"; then
AC_MSG_ERROR([cannot find ranlib in your PATH])
fi
RanlibCmd="$RANLIB"
if test "$HostOS" = "mingw32"
then
RanlibCmd=$(cygpath -m "$RANLIB")
else
RanlibCmd="$RANLIB"
fi
AC_SUBST([RanlibCmd])
dnl ** which strip to use?
......
......@@ -9,7 +9,12 @@ AC_DEFUN([FP_FIND_NM],
AC_MSG_ERROR([cannot find nm in your PATH])
fi
fi
NmCmd="$NM"
if test "$HostOS" = "mingw32"
then
NmCmd=$(cygpath -m "$NM")
else
NmCmd="$NM"
fi
AC_SUBST([NmCmd])
if test "$TargetOS_CPP" = "darwin"
......@@ -37,4 +42,3 @@ AC_DEFUN([FP_FIND_NM],
esac
fi
])
......@@ -30,7 +30,13 @@ else
fi
fi])
fp_prog_ar_args=$fp_cv_prog_ar_args
AC_SUBST([ArCmd], ["$fp_prog_ar"])
if test "$HostOS" = "mingw32"
then
ArCmd=$(cygpath -m "$fp_prog_ar")
else
ArCmd="$fp_prog_ar"
fi
AC_SUBST([ArCmd])
AC_SUBST([ArArgs], ["$fp_prog_ar_args"])
])# FP_PROG_AR_ARGS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment