Mesa (master): build: llvm libs may not be in system search path, add rpath

Ilia Mirkin imirkin at kemper.freedesktop.org
Tue Feb 25 20:32:07 UTC 2014


Module: Mesa
Branch: master
Commit: d9b983519c63b9072677364a6e399d213a1855e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9b983519c63b9072677364a6e399d213a1855e5

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Mon Feb 24 12:43:17 2014 -0500

build: llvm libs may not be in system search path, add rpath

On my gentoo system, llvm libs are in /usr/lib64/llvm, and llvm-config
--ldflags does not provide the rpath (it does, of course, provide a -L).
This adds the llvm dir to the rpath. It should be harmless if the path
is a system path, and should make things work when it's not.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Tested-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 configure.ac |    1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index b8e3161..0e0fd18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1558,6 +1558,7 @@ if test "x$enable_gallium_llvm" = xyes; then
         LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
         LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
         LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
+        LLVM_LDFLAGS="-Wl,-rpath,$LLVM_LIBDIR $LLVM_LDFLAGS"
 
         AC_COMPUTE_INT([LLVM_VERSION_MAJOR], [LLVM_VERSION_MAJOR],
             [#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])




More information about the mesa-commit mailing list