[Mesa-dev] [PATCH] configure: link against -lLLVM to determine build type
Tom Stellard
tom at stellard.net
Tue Aug 13 19:37:22 PDT 2013
On Tue, Aug 13, 2013 at 05:53:52PM +0200, Maarten Lankhorst wrote:
> Fixes a build failure of 9.2 on ubuntu, because libLLVM-3.3.so is not present in /usr/lib/llvm-3.2/lib.
>
I'm trying to understand the problem here, could you give a little more
information about how Ubuntu packages LLVM? Where are the LLVM
libraries installed and what does llvm-config --libdir --ldflags report?
-Tom
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
> ---
> diff --git a/configure.ac b/configure.ac
> index 35f6797..579d8d4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1870,7 +1870,18 @@ if test "x$MESA_LLVM" != x0; then
> if test "x$with_llvm_shared_libs" = xyes; then
> dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
> LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
> - AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"], [llvm_have_one_so=yes])
> +
> + AC_MSG_CHECKING([whether $LLVM_SO_NAME is a monolithic blob])
> + save_LIBS="$LIBS"
> + save_LDFLAGS="$LDFLAGS"
> + LDFLAGS="$LDFLAGS $LLVM_LDFLAGS"
> + LIBS="$LIBS -l$LLVM_SO_NAME"
> +
> + AC_LINK_IFELSE([AC_LANG_CALL([], [LLVMInitializeCore])],
> + [llvm_have_one_so=yes], [llvm_have_one_so=no])
> + LIBS="$save_LIBS"
> + LDFLAGS="$save_LDFLAGS"
> + AC_MSG_RESULT([$llvm_have_one_so])
>
> if test "x$llvm_have_one_so" = xyes; then
> dnl LLVM was built using auto*, so there is only one shared object.
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list