[Mesa-dev] [PATCH] build: Fix LLVM shared library detection on systems with libLLVM.so.

Nicolai Hähnle nhaehnle at gmail.com
Tue Apr 12 23:17:27 UTC 2016


On 12.04.2016 12:58, Kenneth Graunke wrote:
> Arch Linux ships libLLVM.so.3.7.1 rather than libLLVM-3.7.1.so;
> Mesa's configure script failed to find LLVM shared libraries in this
> case.  I believe they build LLVM with CMake, but there is still only
> one .so file.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>   configure.ac | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> This is mostly a strawman.  llvmpipe hasn't built on my system for
> quite some time, and I finally got around to figuring out why.  I don't
> know much about LLVM build issues (it seems complicated), so feel free
> to throw this patch out and do it properly...

I'm not that big on build system twiddling, so feel free to ignore me, 
but... why aren't we using $LLVM_CONFIG --libs here?

Nicolai

>
> diff --git a/configure.ac b/configure.ac
> index c426c72..bc9530e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2334,6 +2334,12 @@ if test "x$MESA_LLVM" != x0; then
>           LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
>           AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
>
> +        dnl Some systems use libLLVM.so.version instead of libLLVM-version.so.
> +        if test "x$llvm_have_one_so" != xyes; then
> +           LLVM_SO_NAME=LLVM
> +           AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
> +        fi
> +
>           if test "x$llvm_have_one_so" = xyes; then
>               dnl LLVM was built using auto*, so there is only one shared object.
>               LLVM_LIBS="-l$LLVM_SO_NAME"
>


More information about the mesa-dev mailing list