Commit b8fe21e9 authored by Ian Lynagh's avatar Ian Lynagh

Merge branch 'master' of http://darcs.haskell.org/ghc

parents 85fa980f e6bfc596
......@@ -370,6 +370,18 @@ AC_DEFUN([FP_SETTINGS],
SettingsDllWrapCommand="/bin/false"
SettingsWindresCommand="/bin/false"
SettingsTouchCommand='touch'
if test -z "$LlcCmd"
then
SettingsLlcCommand="llc"
else
SettingsLlcCommand="$LlcCmd"
fi
if test -z "$OptCmd"
then
SettingsOptCommand="opt"
else
SettingsOptCommand="$OptCmd"
fi
fi
AC_SUBST(SettingsCCompilerCommand)
AC_SUBST(SettingsCCompilerFlags)
......@@ -377,6 +389,8 @@ AC_DEFUN([FP_SETTINGS],
AC_SUBST(SettingsDllWrapCommand)
AC_SUBST(SettingsWindresCommand)
AC_SUBST(SettingsTouchCommand)
AC_SUBST(SettingsLlcCommand)
AC_SUBST(SettingsOptCommand)
])
......@@ -538,6 +552,35 @@ AC_ARG_WITH($2,
]) # FP_ARG_WITH_PATH_GNU_PROG
# FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL
# --------------------
# XXX
#
# $1 = the variable to set
# $2 = the command to look for
#
AC_DEFUN([FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL],
[
AC_ARG_WITH($2,
[AC_HELP_STRING([--with-$2=ARG],
[Use ARG as the path to $2 [default=autodetect]])],
[
if test "$HostOS" = "mingw32"
then
AC_MSG_WARN([Request to use $withval will be ignored])
else
$1=$withval
fi
],
[
if test "$HostOS" != "mingw32"
then
AC_PATH_PROG([$1], [$2])
fi
]
)
]) # FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL
# FP_PROG_CONTEXT_DIFF
# --------------------
# Figure out how to do context diffs. Sets the output variable ContextDiffCmd.
......
......@@ -251,8 +251,8 @@ initSysTools mbMinusB
ld_args = gcc_args
-- We just assume on command line
; let lc_prog = "llc"
lo_prog = "opt"
; lc_prog <- getSetting "LLVM llc command"
; lo_prog <- getSetting "LLVM opt command"
; return $ Settings {
sTargetPlatform = Platform {
......
......@@ -349,6 +349,18 @@ FP_ARG_WITH_PATH_GNU_PROG([NM], [nm])
NmCmd="$NM"
AC_SUBST([NmCmd])
dnl ** Which LLVM llc to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([LLC], [llc])
LlcCmd="$LLC"
AC_SUBST([LlcCmd])
dnl ** Which LLVM opt to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([OPT], [opt])
OptCmd="$OPT"
AC_SUBST([OptCmd])
dnl ** Mac OS X: explicit deployment target
dnl --------------------------------------------------------------
AC_ARG_WITH([macosx-deployment-target],
......
......@@ -678,6 +678,9 @@ DTRACE = @DtraceCmd@
LD = @LdCmd@
NM = @NmCmd@
LLC = @LlcCmd@
OPT = @OptCmd@
# Some ld's support the -x flag and some don't, so the configure
# script detects which we have and sets LdXFlag to "-x" or ""
# respectively.
......
......@@ -13,6 +13,8 @@
("target word size", "@WordSize@"),
("target has GNU nonexec stack", "@HaskellHaveGnuNonexecStack@"),
("target has .ident directive", "@HaskellHaveIdentDirective@"),
("target has subsections via symbols", "@HaskellHaveSubsectionsViaSymbols@")
("target has subsections via symbols", "@HaskellHaveSubsectionsViaSymbols@"),
("LLVM llc command", "@SettingsLlcCommand@"),
("LLVM opt command", "@SettingsOptCommand@")
]
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