Commit 66108864 authored by Ben Gamari's avatar Ben Gamari 🐢

Revert "Remove special casing of Windows in generic files"

This commit didn't consider the fact that binary distributions on Windows must
have relative toolchain paths. This caused #13560.

This reverts commit 48385cb2 (except for a
helpful comment).
parent 688272ba
...@@ -459,55 +459,42 @@ AC_DEFUN([GET_ARM_ISA], ...@@ -459,55 +459,42 @@ AC_DEFUN([GET_ARM_ISA],
# Set the variables used in the settings file # Set the variables used in the settings file
AC_DEFUN([FP_SETTINGS], AC_DEFUN([FP_SETTINGS],
[ [
SettingsCCompilerCommand="$CC" if test "$windows" = YES
SettingsHaskellCPPCommand="$HaskellCPPCmd"
SettingsHaskellCPPFlags="$HaskellCPPArgs"
SettingsLdCommand="$LdCmd"
SettingsArCommand="$ArCmd"
SettingsPerlCommand="$PerlCmd"
if test -z "$DllWrap"
then then
SettingsDllWrapCommand="/bin/false" mingw_bin_prefix=mingw/bin/
SettingsCCompilerCommand="\$topdir/../${mingw_bin_prefix}gcc.exe"
SettingsHaskellCPPCommand="\$topdir/../${mingw_bin_prefix}gcc.exe"
SettingsHaskellCPPFlags="$HaskellCPPArgs"
SettingsLdCommand="\$topdir/../${mingw_bin_prefix}ld.exe"
SettingsArCommand="\$topdir/../${mingw_bin_prefix}ar.exe"
SettingsPerlCommand='$topdir/../perl/perl.exe'
SettingsDllWrapCommand="\$topdir/../${mingw_bin_prefix}dllwrap.exe"
SettingsWindresCommand="\$topdir/../${mingw_bin_prefix}windres.exe"
SettingsTouchCommand='$topdir/bin/touchy.exe'
else else
SettingsDllWrapCommand="$DllWrap" SettingsCCompilerCommand="$CC"
fi SettingsHaskellCPPCommand="$HaskellCPPCmd"
SettingsHaskellCPPFlags="$HaskellCPPArgs"
if test -z "$Windres" SettingsLdCommand="$LdCmd"
then SettingsArCommand="$ArCmd"
SettingsPerlCommand="$PerlCmd"
SettingsDllWrapCommand="/bin/false"
SettingsWindresCommand="/bin/false" SettingsWindresCommand="/bin/false"
else
SettingsWindresCommand="$Windres"
fi
if test -z "$Libtool"
then
SettingsLibtoolCommand="libtool" SettingsLibtoolCommand="libtool"
else
SettingsLibtoolCommand="$Libtool"
fi
if test -z "$Touch"
then
SettingsTouchCommand='touch' SettingsTouchCommand='touch'
else
SettingsTouchCommand='$Touch'
fi fi
if test -z "$LlcCmd" if test -z "$LlcCmd"
then then
SettingsLlcCommand="llc" SettingsLlcCommand="llc"
else else
SettingsLlcCommand="$LlcCmd" SettingsLlcCommand="$LlcCmd"
fi fi
if test -z "$OptCmd" if test -z "$OptCmd"
then then
SettingsOptCommand="opt" SettingsOptCommand="opt"
else else
SettingsOptCommand="$OptCmd" SettingsOptCommand="$OptCmd"
fi fi
SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2" SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2" SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2"
SettingsCCompilerSupportsNoPie="$CONF_GCC_SUPPORTS_NO_PIE" SettingsCCompilerSupportsNoPie="$CONF_GCC_SUPPORTS_NO_PIE"
......
...@@ -177,9 +177,13 @@ then ...@@ -177,9 +177,13 @@ then
if test "$ghc_host_os" = "mingw32" if test "$ghc_host_os" = "mingw32"
then then
# Canonicalise to <drive>:/path/to/ghc if test "${OSTYPE}" = "msys"
WithGhc=`cygpath -m "${WithGhc}"` then
WithGhc=`echo "${WithGhc}" | sed "s#^/\([a-zA-Z]\)/#\1:/#"`
else
# Canonicalise to <drive>:/path/to/ghc
WithGhc=`cygpath -m "${WithGhc}"`
fi
echo "GHC path canonicalised to: ${WithGhc}" echo "GHC path canonicalised to: ${WithGhc}"
fi fi
fi fi
...@@ -374,8 +378,6 @@ then ...@@ -374,8 +378,6 @@ then
NM="${mingwbin}nm.exe" NM="${mingwbin}nm.exe"
RANLIB="${mingwbin}ranlib.exe" RANLIB="${mingwbin}ranlib.exe"
OBJDUMP="${mingwbin}objdump.exe" OBJDUMP="${mingwbin}objdump.exe"
Windres="${mingwbin}windres.exe"
DllWrap="${mingwbin}dllwrap.exe"
fp_prog_ar="${mingwbin}ar.exe" fp_prog_ar="${mingwbin}ar.exe"
# NB. Download the perl binaries if required # NB. Download the perl binaries if required
...@@ -727,6 +729,7 @@ AC_SUBST(HaveDtrace) ...@@ -727,6 +729,7 @@ AC_SUBST(HaveDtrace)
AC_PATH_PROG(HSCOLOUR,HsColour) AC_PATH_PROG(HSCOLOUR,HsColour)
# HsColour is passed to Cabal, so we need a native path # HsColour is passed to Cabal, so we need a native path
if test "$HostOS" = "mingw32" && \ if test "$HostOS" = "mingw32" && \
test "${OSTYPE}" != "msys" && \
test "${HSCOLOUR}" != "" test "${HSCOLOUR}" != ""
then then
# Canonicalise to <drive>:/path/to/gcc # Canonicalise to <drive>:/path/to/gcc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment