summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2015-04-08 15:11:38 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2015-04-11 06:45:07 +1000
commit485dba86d2519cc4855e01db279e127d0221f88a (patch)
treed9dd0fbf24a46c2a719a6c22334b0e68bda8b012 /distrib
parent9d16808e1b6dd2fb7ab3eb5712d9842e77d57631 (diff)
downloadhaskell-485dba86d2519cc4855e01db279e127d0221f88a.tar.gz
configure : LLVM and LD detections improvements (#10234).
* distrib/configure.ac.in : Detect correct version of LLVM tools as was done for the top level configure.ac in 42448e3757. * aclocal.m4 : Add a FIND_LD macro that can be used in both configure scripts. * Use new FIND_LD macro in both configure scripts. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com> Test Plan: validate on amd64-linux and armhf-linux. Reviewers: rwbarton, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D828 GHC Trac Issues: #10234
Diffstat (limited to 'distrib')
-rw-r--r--distrib/configure.ac.in21
1 files changed, 19 insertions, 2 deletions
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index ab5c29933a..0fcd869491 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -68,10 +68,27 @@ FP_CPP_CMD_WITH_ARGS(HaskellCPPCmd, HaskellCPPArgs)
AC_SUBST([HaskellCPPCmd])
AC_SUBST([HaskellCPPArgs])
+# Here is where we re-target which specific version of the LLVM
+# tools we are looking for. In the past, GHC supported a number of
+# versions of LLVM simultaneously, but that stopped working around
+# 3.5/3.6 release of LLVM.
+LlvmVersion=@LlvmVersion@
+
+dnl ** Which LLVM llc to use?
+dnl --------------------------------------------------------------
+FIND_LLVM_PROG([LLC], [llc], [llc], [$LlvmVersion])
+LlcCmd="$LLC"
+AC_SUBST([LlcCmd])
+
+dnl ** Which LLVM opt to use?
+dnl --------------------------------------------------------------
+FIND_LLVM_PROG([OPT], [opt], [opt], [$LlvmVersion])
+OptCmd="$OPT"
+AC_SUBST([OptCmd])
+
dnl ** Which ld to use?
dnl --------------------------------------------------------------
-FP_ARG_WITH_PATH_GNU_PROG([LD], [ld], [ld])
-LdCmd="$LD"
+FIND_LD([LdCmd])
AC_SUBST([LdCmd])
FP_GCC_VERSION