summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorAlp Mestanogullari <alp@well-typed.com>2018-04-17 23:04:11 +0100
committerTamar Christina <tamar@zhox.com>2018-04-17 23:08:30 +0100
commit5d76846405240c051b00cddcda9d8d02c880968e (patch)
treee63b4fdae0d8e236a3a6e291bf164b38d80f2b5c /aclocal.m4
parentcab3e6bfa8486c6c8eecac269c54d662f1371a0c (diff)
downloadhaskell-5d76846405240c051b00cddcda9d8d02c880968e.tar.gz
Introduce a $tooldir variable for nicer toolchain detection on Windows
Summary: This patch affects several files that affect how we detect mingw and perl on Windows. The initial motivation is: https://github.com/snowleopard/hadrian/issues/564 where, with Hadrian building relocatable (non-inplace) GHCs, the current detection mechanism falls short by e.g only trying $topdir/../mingw. But in Hadrian, for reasons given in that issue, we would need to store e.g mingw under $topdir/../../mingw except for binary distributions, where we want to follow the existing structure, in which case $topdir/../mingw is correct. So we need to support both, which is what this patch hopefully implements. Test Plan: ./validate Reviewers: Phyx, hvr, bgamari, erikd Reviewed By: Phyx Subscribers: snowleopard, thomie, carter Differential Revision: https://phabricator.haskell.org/D4598
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m416
1 files changed, 8 insertions, 8 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 5b0a679e58..a48a5af238 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -470,15 +470,15 @@ AC_DEFUN([FP_SETTINGS],
if test "$windows" = YES -a "$EnableDistroToolchain" = "NO"
then
mingw_bin_prefix=mingw/bin/
- SettingsCCompilerCommand="\$topdir/../${mingw_bin_prefix}gcc.exe"
- SettingsHaskellCPPCommand="\$topdir/../${mingw_bin_prefix}gcc.exe"
+ SettingsCCompilerCommand="\$tooldir/${mingw_bin_prefix}gcc.exe"
+ SettingsHaskellCPPCommand="\$tooldir/${mingw_bin_prefix}gcc.exe"
SettingsHaskellCPPFlags="$HaskellCPPArgs"
- SettingsLdCommand="\$topdir/../${mingw_bin_prefix}ld.exe"
- SettingsArCommand="\$topdir/../${mingw_bin_prefix}ar.exe"
- SettingsRanlibCommand="\$topdir/../${mingw_bin_prefix}ranlib.exe"
- SettingsPerlCommand='$topdir/../perl/perl.exe'
- SettingsDllWrapCommand="\$topdir/../${mingw_bin_prefix}dllwrap.exe"
- SettingsWindresCommand="\$topdir/../${mingw_bin_prefix}windres.exe"
+ SettingsLdCommand="\$tooldir/${mingw_bin_prefix}ld.exe"
+ SettingsArCommand="\$tooldir/${mingw_bin_prefix}ar.exe"
+ SettingsRanlibCommand="\$tooldir/${mingw_bin_prefix}ranlib.exe"
+ SettingsPerlCommand='$tooldir/perl/perl.exe'
+ SettingsDllWrapCommand="\$tooldir/${mingw_bin_prefix}dllwrap.exe"
+ SettingsWindresCommand="\$tooldir/${mingw_bin_prefix}windres.exe"
SettingsTouchCommand='$topdir/bin/touchy.exe'
elif test "$EnableDistroToolchain" = "YES"
then