summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-02-24 12:43:17 -0500
committerIlia Mirkin <[email protected]>2014-02-25 15:30:13 -0500
commitd9b983519c63b9072677364a6e399d213a1855e5 (patch)
tree1a014646f1211ec087473bd8aecbf69236cbfed5 /configure.ac
parent42c2366de5a09227ae662b10ff479cee88a1f6c3 (diff)
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 <[email protected]> Reviewed-by: Tom Stellard <[email protected]> Tested-by: Emil Velikov <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b8e3161e116..0e0fd1820f4 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"])