Commit 2e031806 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

configure: Search for LLVM executables with two-number versions

Fedora uses the naming llc-7.0 while Debian uses llc-7. Ensure that both
are found.

Fixes #16990.
parent 3b31a94d
...@@ -2112,7 +2112,8 @@ AC_DEFUN([XCODE_VERSION],[ ...@@ -2112,7 +2112,8 @@ AC_DEFUN([XCODE_VERSION],[
# FIND_LLVM_PROG() # FIND_LLVM_PROG()
# -------------------------------- # --------------------------------
# Find where the llvm tools are. We have a special function to handle when they # Find where the llvm tools are. We have a special function to handle when they
# are installed with a version suffix (e.g., llc-3.1). # are installed with a version suffix (e.g., llc-7, llc-7.0) and without (e.g.
# llc).
# #
# $1 = the variable to set # $1 = the variable to set
# $2 = the command to look for # $2 = the command to look for
...@@ -2120,7 +2121,7 @@ AC_DEFUN([XCODE_VERSION],[ ...@@ -2120,7 +2121,7 @@ AC_DEFUN([XCODE_VERSION],[
# #
AC_DEFUN([FIND_LLVM_PROG],[ AC_DEFUN([FIND_LLVM_PROG],[
# Test for program with and without version name. # Test for program with and without version name.
AC_CHECK_TOOLS([$1], [$2-$3 $2], [:]) AC_CHECK_TOOLS([$1], [$2-$3 $2-$3.0 $2], [:])
if test "$$1" != ":"; then if test "$$1" != ":"; then
AC_MSG_CHECKING([$$1 is version $3]) AC_MSG_CHECKING([$$1 is version $3])
if test `$$1 --version | grep -c "version $3"` -gt 0 ; then if test `$$1 --version | grep -c "version $3"` -gt 0 ; then
......
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