summarylogtreecommitdiffstats
path: root/use-static-llvm40.patch
blob: cd2d92c00b8d0e3512830b77b2641a55b78697e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff -aur --no-dereference radium-5.9.9.pristine/bin/packages/faust2/compiler/Makefile.unix radium-5.9.9.new/bin/packages/faust2/compiler/Makefile.unix
--- radium-5.9.9.pristine/bin/packages/faust2/compiler/Makefile.unix	2018-10-24 19:47:31.000000000 +0100
+++ radium-5.9.9.new/bin/packages/faust2/compiler/Makefile.unix	2018-10-24 21:01:11.425278974 +0100
@@ -26,7 +26,7 @@
 # link a suitable llvm-config to a location somewhere on your PATH, or just
 # set LLVM_CONFIG manually.
 
-LLVM_CONFIG = $(lastword $(wildcard /usr/bin/llvm-config* /opt/local/bin/llvm-config* /usr/local/bin/llvm-config*) $(shell which llvm-config 2> /dev/null))
+LLVM_CONFIG = /usr/bin/llvm-config-4.0
 
 ## On Darwin build both 32 and 64-bits intel versions
 ifeq ($(system), Darwin)
@@ -47,7 +47,7 @@
 endif
 endif
 
-LLVM_STATIC_LIBS = $(shell $(LLVM_CONFIG) --libfiles)
+LLVM_STATIC_LIBS = $(shell $(LLVM_CONFIG) --link-static --libfiles)
 LLVM_VERSION = $(shell $(LLVM_CONFIG) --version)
 
 ## On Windows (mingw32) we must link against the socket library.
@@ -225,7 +225,7 @@
 ifneq ($(findstring MINGW32, $(system)),)
 	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(objects) main.o libcode.o global.o `$(LLVM_CONFIG) --ldflags` $(LLVMLIBS) $(CLANGLIBS) $(LIBS) -lpthread -o faust
 else
-	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(objects) main.o libcode.o global.o `$(LLVM_CONFIG) --ldflags` $(LLVMLIBS) $(CLANGLIBS) -ldl -lcrypto -lz -lncurses -lpthread -o faust
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(objects) main.o libcode.o global.o $(LLVM_STATIC_LIBS) $(CLANGLIBS) -ldl -lcrypto -lz -lncurses -lpthread -o faust
 endif
 
 ifeq ($(system), Darwin)
diff -aur --no-dereference radium-5.9.9.pristine/build_linux_common.sh radium-5.9.9.new/build_linux_common.sh
--- radium-5.9.9.pristine/build_linux_common.sh	2018-10-24 19:47:31.000000000 +0100
+++ radium-5.9.9.new/build_linux_common.sh	2018-10-24 21:10:37.075259725 +0100
@@ -106,19 +106,13 @@
 PYTHONLIBPATH=`$PYTHONEXE -c "import sys;print '-L'+sys.prefix+'/lib'"`
 PYTHONLIBNAME=`$PYTHONEXE -c "import sys;print '-lpython'+sys.version[:3]"`
 
-LLVM_OPTS=`llvm-config --cppflags`
-
-MAYBELLVM=`llvm-config --libdir`/libLLVM-`llvm-config --version`.so
-if [ -f $MAYBELLVM ]; then
-    LLVMLIBS=-lLLVM-`llvm-config --version`
-else
-    LLVMLIBS=`llvm-config --libs`
-fi
+LLVM_OPTS=`llvm-config-4.0 --cppflags`
+LLVMLIBS=`llvm-config-4.0 --link-static --libfiles`
 
 export QSCINTILLA_PATH=`pwd`/bin/packages/QScintilla_gpl-2.10.1
 
 if env |grep INCLUDE_FAUSTDEV ; then
-    FAUSTLDFLAGS="$QSCINTILLA_PATH/Qt4Qt5/libqscintilla2_qt5.a bin/packages/faust2/compiler/libfaust.a `$PKG --libs uuid` `llvm-config --ldflags` $LLVMLIBS -lcrypto -lncurses"
+    FAUSTLDFLAGS="$QSCINTILLA_PATH/Qt4Qt5/libqscintilla2_qt5.a bin/packages/faust2/compiler/libfaust.a `$PKG --libs uuid` $LLVMLIBS -lcrypto -lncurses"
 else    
     FAUSTLDFLAGS=""
 fi