Mesa (master): configure: include llvm systemlibs when using static llvm

Emil Velikov evelikov at kemper.freedesktop.org
Wed Oct 29 18:54:51 UTC 2014


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

Author: Jan Vesely <jan.vesely at rutgers.edu>
Date:   Thu Oct 23 17:17:07 2014 -0400

configure: include llvm systemlibs when using static llvm

v2: drop -WL,--exclude-libs, it's not necessary
    fix tabs/spaces

Cc: mesa-stable at lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70410
Tested-by: Kai Wasserbäch <kai at dev.carbon-project.org>
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>

---

 configure.ac |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 03f1bca..765a3a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2007,7 +2007,12 @@ if test "x$MESA_LLVM" != x0; then
            dnl already added all of these objects to LLVM_LIBS.
         fi
     else
-        AC_MSG_WARN([Building mesa with staticly linked LLVM may cause compilation issues])
+        AC_MSG_WARN([Building mesa with statically linked LLVM may cause compilation issues])
+        dnl We need to link to llvm system libs when using static libs
+        dnl However, only llvm 3.5+ provides --system-libs
+        if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then
+            LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --system-libs`"
+        fi
     fi
 fi
 




More information about the mesa-commit mailing list