[commit: ghc] master: Find LLVM tools when version number at end (e.g., llc-3.0) (#7661) (64aaaa1)

Ian Lynagh ian at well-typed.com
Fri Feb 15 19:03:40 CET 2013

On Wed, Feb 13, 2013 at 07:11:11PM -0800, David Terei wrote:
> +    FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([$1], [$2], [$3])
> +    if test "$1" == ""; then
> +        GOOD_PATH=`echo $PATH | tr ':,;' '   '`

Hmm. I don't think we'll ever have a $PATH containing a path like
c:/..., but there could certainly be paths containing spaces.

> +        $1=`${FindCmd} ${GOOD_PATH} -type f -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' | ${SortCmd} -n | tail -1`

This feels rather unpleasant to me. Is it likely that someone will have
programs called llc-3.0 etc, but no llc? If not, I'd suggest that we
just detect llc and they can override which llc gets used with a
--with-llc flag if they want to.

In fact, i think we should do that regardless. After all, we don't try
searching for gcc-4.6 etc either.


More information about the ghc-devs mailing list