[Libclc-dev] [PATCH 1/2] Fix build with LLVM 3.5

Tom Stellard tom at stellard.net
Thu Dec 19 21:57:49 PST 2013


From: Tom Stellard <thomas.stellard at amd.com>

---
 configure.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure.py b/configure.py
index 1c6929f..2038b11 100755
--- a/configure.py
+++ b/configure.py
@@ -10,6 +10,7 @@ version_patch = 1;
 
 from optparse import OptionParser
 import os
+import string
 from subprocess import *
 import sys
 
@@ -62,8 +63,13 @@ def llvm_config(args):
     print "Please ensure that llvm-config is in your $PATH, or use --with-llvm-config."
     sys.exit(1)
 
+llvm_version = string.split(string.replace(llvm_config(['--version']), 'svn', ''), '.')
+llvm_system_libs = ''
+if (int(llvm_version[0]) == 3 and int(llvm_version[1]) >= 5) or int(llvm_version[0]) > 3:
+    llvm_system_libs = llvm_config(['--system-libs'])
 llvm_bindir = llvm_config(['--bindir'])
 llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader', 'bitwriter']) + ' ' + \
+                 llvm_system_libs + ' ' + \
                  llvm_config(['--ldflags'])
 llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions -fno-rtti'
 
-- 
1.8.1.4





More information about the Libclc-dev mailing list