From: Ilias Tsitsimpis Date: Mon, 17 Feb 2025 08:44:23 +0000 (+0100) Subject: Allow setting path for LLC/OPT during configuration X-Git-Tag: archive/raspbian/9.6.6-4+rpi1^2~22 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=04b87b9f3d10dd64256610b34a9ad32b16127ba3;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 59713a41..b974763d 100644 --- a/configure.ac +++ b/configure.ac @@ -574,14 +574,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 22f351ea..68a5ad0b 100644 --- a/distrib/configure.ac.in +++ b/distrib/configure.ac.in @@ -152,14 +152,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])