From: Ilias Tsitsimpis Date: Wed, 18 Oct 2023 19:50:19 +0000 (+0300) Subject: Allow setting path for LLC/OPT during configuration X-Git-Tag: archive/raspbian/9.4.7-2+rpi1~2^2^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9d30be9f3beea02817f86db59c68d2c8fdc31d0b;p=ghc.git Allow setting path for LLC/OPT during configuration Patch configure.ac to allow us to modify the path for LLC/OPT during configuration. Gbp-Pq: Name allow-setting-llvm-program --- diff --git a/configure.ac b/configure.ac index 3b39615b..5d411c55 100644 --- a/configure.ac +++ b/configure.ac @@ -600,14 +600,18 @@ AC_SUBST([ClangCmd]) dnl ** Which LLVM llc to use? dnl -------------------------------------------------------------- AC_ARG_VAR(LLC,[Use as the path to LLVM's llc [default=autodetect]]) -FIND_LLVM_PROG([LLC], [llc], [$LlvmMinVersion], [$LlvmMaxVersion]) +if test -z "$LLC"; then + FIND_LLVM_PROG([LLC], [llc], [$LlvmMinVersion], [$LlvmMaxVersion]) +fi LlcCmd="$LLC" AC_SUBST([LlcCmd]) dnl ** Which LLVM opt to use? dnl -------------------------------------------------------------- AC_ARG_VAR(OPT,[Use as the path to LLVM's opt [default=autodetect]]) -FIND_LLVM_PROG([OPT], [opt], [$LlvmMinVersion], [$LlvmMaxVersion]) +if test -z "$OPT"; then + FIND_LLVM_PROG([OPT], [opt], [$LlvmMinVersion], [$LlvmMaxVersion]) +fi OptCmd="$OPT" AC_SUBST([OptCmd]) diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in index a1e4d6d2..0317fd69 100644 --- a/distrib/configure.ac.in +++ b/distrib/configure.ac.in @@ -145,14 +145,18 @@ LlvmMaxVersion=@LlvmMaxVersion@ dnl ** Which LLVM llc to use? dnl -------------------------------------------------------------- AC_ARG_VAR(LLC,[Use as the path to LLVM's llc [default=autodetect]]) -FIND_LLVM_PROG([LLC], [llc], [$LlvmMinVersion], [$LlvmMaxVersion]) +if test -z "$LLC"; then + FIND_LLVM_PROG([LLC], [llc], [$LlvmMinVersion], [$LlvmMaxVersion]) +fi LlcCmd="$LLC" AC_SUBST([LlcCmd]) dnl ** Which LLVM opt to use? dnl -------------------------------------------------------------- AC_ARG_VAR(OPT,[Use as the path to LLVM's opt [default=autodetect]]) -FIND_LLVM_PROG([OPT], [opt], [$LlvmMinVersion], [$LlvmMaxVersion]) +if test -z "$OPT"; then + FIND_LLVM_PROG([OPT], [opt], [$LlvmMinVersion], [$LlvmMaxVersion]) +fi OptCmd="$OPT" AC_SUBST([OptCmd])