diff options
| author | Khem Raj <raj.khem@gmail.com> | 2017-07-29 00:42:49 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-31 15:13:32 +0100 |
| commit | 6f12ac612ca29adc2f2a40526a757adfee92fb12 (patch) | |
| tree | 3bb923d150fbb74cfbad6690d708ff18c2c43e4b /meta/recipes-graphics/mesa/files/llvm-config-version.patch | |
| parent | 5c77067ee9c18e056515a5e83e7282b0035dfb49 (diff) | |
| download | poky-6f12ac612ca29adc2f2a40526a757adfee92fb12.tar.gz | |
mesa: Fix build when building with llvmpipe
Add following in mesa.inc to enable llvmpipe
PACKAGECONFIG_append_x86 = " gallium-llvm gallium r600"
PACKAGECONFIG_append_x86-64 = " gallium-llvm gallium r600"
This would enable llvmpipe for swrast, to check run this
root@qemux86:~# glxinfo | grep llvm
Device: llvmpipe (LLVM 5.0, 128 bits) (0xffffffff)
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 5.0, 128 bits)
Backport patches to support llvm 5.0.0+
Add a patch to understand llvm version when llvm is build from git/svn
(From OE-Core rev: da29bc17e4dd748f50b054c5e3afaf8d41bf4077)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/files/llvm-config-version.patch')
| -rw-r--r-- | meta/recipes-graphics/mesa/files/llvm-config-version.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/llvm-config-version.patch b/meta/recipes-graphics/mesa/files/llvm-config-version.patch new file mode 100644 index 0000000000..aa33a1e915 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/llvm-config-version.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | When building llvm from git or svn it embeds the svn/git revision into internal version string | ||
| 2 | |||
| 3 | $ /mnt/a/oe/build/tmp/work/corei7-64-bec-linux/mesa/2_17.1.5-r0/recipe-sysroot/usr/lib/llvm5.0/llvm-config-host --version | ||
| 4 | 5.0.0git-9a5c333388c | ||
| 5 | |||
| 6 | We need to ignore everything after 5.0.0 which is what the cut cmd is doing | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | |||
| 11 | Index: mesa-17.1.5/configure.ac | ||
| 12 | =================================================================== | ||
| 13 | --- mesa-17.1.5.orig/configure.ac | ||
| 14 | +++ mesa-17.1.5/configure.ac | ||
| 15 | @@ -967,7 +967,7 @@ strip_unwanted_llvm_flags() { | ||
| 16 | |||
| 17 | llvm_set_environment_variables() { | ||
| 18 | if test "x$LLVM_CONFIG" != xno; then | ||
| 19 | - LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'` | ||
| 20 | + LLVM_VERSION=`$LLVM_CONFIG --version | cut -c1-5` | ||
| 21 | LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"` | ||
| 22 | LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir` | ||
| 23 | LLVM_LIBDIR=`$LLVM_CONFIG --libdir` | ||
| 24 | @@ -2560,7 +2560,7 @@ if test "x$enable_llvm" = xyes; then | ||
| 25 | dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823) | ||
| 26 | if test "x$enable_llvm_shared_libs" = xyes; then | ||
| 27 | dnl We can't use $LLVM_VERSION because it has 'svn' stripped out, | ||
| 28 | - LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version` | ||
| 29 | + LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version|cut -c1-5` | ||
| 30 | AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes]) | ||
| 31 | |||
| 32 | if test "x$llvm_have_one_so" = xyes; then | ||
