Description: make build-system respect LDFLAGS
 so we can pass hardening flags
Author: Debian
Forwarded: no
Last-Update: 2016-05-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- faust.orig/architecture/httpdlib/src/Makefile
+++ faust/architecture/httpdlib/src/Makefile
@@ -62,7 +62,7 @@
 	$(CXX) -dynamiclib $(INSTALL_NAME) $(ARCHFLAGS) $(objects) `pkg-config --libs libmicrohttpd` -o $@
 
 ../libHTTPDFaust.so  :  $(objects)
-	$(CXX) -shared -fPIC -o $@ $(objects) `pkg-config --libs libmicrohttpd`
+	$(CXX) -shared -fPIC -o $@ $(objects) `pkg-config --libs libmicrohttpd` $(LDFLAGS)
 
 ../libHTTPDFaust.dll  :  $(objects)
 	$(CXX) -shared -o $@ $(objects) `pkg-config --libs libmicrohttpd` -lwsock32
--- faust.orig/architecture/osclib/faust/Makefile
+++ faust/architecture/osclib/faust/Makefile
@@ -69,7 +69,7 @@
 	$(CXX) -dynamiclib $(INSTALL_NAME) -compatibility_version $(SOVERSION) -current_version $(VERSION) $(ARCHFLAGS) $(objects) -L.. -loscpack -o libOSCFaust.$(VERSION).dylib
 
 libOSCFaust.so.$(VERSION) : $(objects)
-	$(CXX) -shared -Wl,-soname,$(SONAME) -fPIC $(ARCHFLAGS) $(objects) -L.. -loscpack -o libOSCFaust.so.$(VERSION)
+	$(CXX) -shared -Wl,-soname,$(SONAME) -fPIC $(ARCHFLAGS) $(objects) -L.. -loscpack -o libOSCFaust.so.$(VERSION) $(LDFLAGS)
 
 libOSCFaust-$(VERSION).dll : $(objects)
 	$(CXX) -shared $(ARCHFLAGS) $(objects) -L.. -loscpack -lwsock32 -lws2_32 -lwinmm -o libOSCFaust-$(VERSION).dll
--- faust.orig/benchmark/Makefile.compile
+++ faust/benchmark/Makefile.compile
@@ -8,7 +8,7 @@
 
 $(DEST)%$(EXT) : %.dsp 
 	faust $(VEC) -a $(ARCH) $< -o $@.cpp
-	$(CXX) -O3 $(CXXFLAGS) $@.cpp $(LIB) -o $@
+	$(CXX) -O3 $(CXXFLAGS) $@.cpp $(LIB) -o $@ $(LDFLAGS)
 	
 
 clean :
--- faust.orig/examples/Makefile.compile
+++ faust/examples/Makefile.compile
@@ -8,7 +8,7 @@
 
 $(DEST)%$(EXT) : %.dsp 
 	faust $(VEC) -a $(ARCH) $< -o $@.cpp
-	$(CXX) $@.cpp $(CXXFLAGS) $(LIB) -o $@
+	$(CXX) $@.cpp $(CXXFLAGS) $(LIB) -o $@ $(LDFLAGS)
 	
 
 clean :
--- faust.orig/examples/faust-tubes/Makefile.compile
+++ faust/examples/faust-tubes/Makefile.compile
@@ -8,7 +8,7 @@
 
 $(DEST)%$(EXT) : %.dsp 
 	faust $(VEC) -a $(ARCH) $< -o $@.cpp
-	$(CXX) $@.cpp $(CXXFLAGS) $(LIB) -o $@
+	$(CXX) $@.cpp $(CXXFLAGS) $(LIB) -o $@ $(LDFLAGS)
 	
 
 clean :
--- faust.orig/tools/faust2pd/examples/basic/Makefile
+++ faust/tools/faust2pd/examples/basic/Makefile
@@ -46,7 +46,7 @@
 xml: $(xml)
 
 %~$(DLL): %.cpp
-	$(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $< -o $@ $(PDLIB)
+	$(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $< -o $@ $(PDLIB) $(LDFLAGS)
 
 %.cpp: %.dsp
 	faust $(VEC) -a $(ARCH) $< -o $@
--- faust.orig/tools/faust2pd/examples/faust/Makefile
+++ faust/tools/faust2pd/examples/faust/Makefile
@@ -46,7 +46,7 @@
 xml: $(xml)
 
 %~$(DLL): %.cpp
-	$(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $< -o $@ $(PDLIB)
+	$(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $< -o $@ $(PDLIB) $(LDFLAGS)
 
 %.cpp: %.dsp
 	faust $(VEC) -a $(ARCH) $< -o $@
--- faust.orig/tools/faust2pd/examples/seqdemo/Makefile
+++ faust/tools/faust2pd/examples/seqdemo/Makefile
@@ -48,7 +48,7 @@
 xml: $(xml)
 
 %~$(DLL): %.cpp
-	$(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $< -o $@ $(PDLIB)
+	$(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $< -o $@ $(PDLIB) $(LDFLAGS)
 
 %.cpp: %.dsp
 	faust $(VEC) -a $(ARCH) $< -o $@
--- faust.orig/tools/faust2pd/examples/synth/Makefile
+++ faust/tools/faust2pd/examples/synth/Makefile
@@ -82,7 +82,7 @@
 	faust -xml $< -o /dev/null
 
 %~$(DLL): %.cpp
-	$(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $< -o $@ $(PDLIB)
+	$(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $< -o $@ $(PDLIB) $(LDFLAGS)
 
 %.pd: %.dsp.xml
 	$(faust2pd) -s $<
--- faust.orig/compiler/Makefile.unix
+++ faust/compiler/Makefile.unix
@@ -28,7 +28,7 @@
 all : faust
 
 faust : $(objects)
-	$(CXX) $(CXXFLAGS) $(objects) -o faust $(LIBS)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(objects) -o faust $(LIBS)
 
 
 .PHONY: clean depend ctags parser
