On Tue, Feb 18, 2014 at 9:36 PM, Albert Graef <[email protected]> wrote:
> Stephane, I'd suggest to have the Makefile check for a shared LLVM lib
> before relying on `llvm-config --libs`. The attached patch against
> Makefile.unix does the trick for me. Ok to commit? (You should first
> give this a whirl on OS X, though, to see if it works there as well.)

Stephane, do you have any thoughts on this?

Also, James, did the patch work for you?

I'm attaching the suggested patch again, in case it was missed.

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  [email protected]
WWW:    https://plus.google.com/+AlbertGraef
diff --git a/compiler/Makefile.unix b/compiler/Makefile.unix
index 11211f8..46466f4 100755
--- a/compiler/Makefile.unix
+++ b/compiler/Makefile.unix
@@ -63,6 +63,13 @@ CXXFLAGS += -fvisibility=hidden -Wno-overloaded-virtual -Wno-parentheses $(addpr
 CXXFLAGS += -I`$(LLVM_CONFIG) --includedir` -I../architecture -D$(LLVM_VERSION) -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
 CXXFLAGS += $(ARCHFLAGS)
 
+LLVMSHLIB = $(wildcard $(shell $(LLVM_CONFIG) --libdir)/libLLVM-$(shell $(LLVM_CONFIG) --version).$(LIB_EXT))
+
+ifeq ($(LLVMSHLIB),)
+LLVMLIBS = $(shell $(LLVM_CONFIG) --libs)
+else
+LLVMLIBS = -l$(patsubst lib%,%,$(notdir $(basename $(LLVMSHLIB))))
+endif
 
 ifeq ($(system), Darwin)
 all : faust libfaust.a
@@ -81,7 +88,7 @@ main.o : main.cpp
 	$(CXX) $(CXXFLAGS) main.cpp -c -o main.o
 
 faust : $(objects) main.o libmain.o global.o scheduler.ll
-	$(CXX) $(CXXFLAGS) $(objects) main.o libmain.o global.o `$(LLVM_CONFIG) --ldflags --libs all` -ldl -o faust
+	$(CXX) $(CXXFLAGS) $(objects) main.o libmain.o global.o `$(LLVM_CONFIG) --ldflags` $(LLVMLIBS) -ldl -o faust
 
 scheduler.ll : ../architecture/scheduler.cpp
 	$(LLVM_CLANG) -O3 -D$(LLVM_VERSION) -emit-llvm -S ../architecture/scheduler.cpp -o scheduler.ll
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to