summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0005-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
blob: 94189ac714381442e5fdd4378c1215964c61cadf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 33025fb1650768a0b923f3c824c270628eef83db Mon Sep 17 00:00:00 2001
From: Otavio Salvador <otavio@ossystems.com.br>
Date: Tue, 5 Jun 2018 11:11:10 -0300
Subject: [PATCH 5/7] Properly get LLVM version when using LLVM Git releases
Organization: O.S. Systems Software LTDA.

$ llvm-config-host --version
5.0.0git-9a5c333388c

We need to ignore everything after 5.0.0 which is what the cut cmd is
doing

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7c95598afc..c248248c6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1075,7 +1075,7 @@ strip_unwanted_llvm_flags() {
 
 llvm_set_environment_variables() {
     if test "x$LLVM_CONFIG" != xno; then
-        LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
+        LLVM_VERSION=`$LLVM_CONFIG --version | cut -c1-5`
         LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
         LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
         LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
@@ -2776,7 +2776,7 @@ detect_old_buggy_llvm() {
     dnl ourselves.
     dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
     dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
-    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
+    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5`
     AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
 
     if test "x$llvm_have_one_so" = xyes; then
-- 
2.17.1