Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From: Otavio Salvador <otavio@ossystems.com.br> |
| 2 | Subject: [PATCH] Properly get LLVM version when using LLVM Git releases |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 3 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | $ llvm-config-host --version |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 5 | 5.0.0git-9a5c333388c |
| 6 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 7 | We need to ignore everything after 5.0.0 which is what the cut cmd is |
| 8 | doing |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 9 | |
| 10 | Upstream-Status: Pending |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 12 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> |
| 13 | --- |
| 14 | configure.ac | 4 ++-- |
| 15 | 1 file changed, 2 insertions(+), 2 deletions(-) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 16 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | diff --git a/configure.ac b/configure.ac |
| 18 | index a02173f244..b107f04c2e 100644 |
| 19 | --- a/configure.ac |
| 20 | +++ b/configure.ac |
| 21 | @@ -995,7 +995,7 @@ strip_unwanted_llvm_flags() { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 22 | |
| 23 | llvm_set_environment_variables() { |
| 24 | if test "x$LLVM_CONFIG" != xno; then |
| 25 | - LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'` |
| 26 | + LLVM_VERSION=`$LLVM_CONFIG --version | cut -c1-5` |
| 27 | LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"` |
| 28 | LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir` |
| 29 | LLVM_LIBDIR=`$LLVM_CONFIG --libdir` |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | @@ -2644,7 +2644,7 @@ detect_old_buggy_llvm() { |
| 31 | dnl ourselves. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 32 | dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 33 | dnl We can't use $LLVM_VERSION because it has 'svn' stripped out, |
| 34 | - LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version` |
| 35 | + LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5` |
| 36 | AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes]) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 37 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 38 | if test "x$llvm_have_one_so" = xyes; then |
| 39 | -- |
| 40 | 2.15.1 |
| 41 | |