File: hardening.patch

package info (click to toggle)
disulfinder 1.2.11-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,244 kB
  • sloc: cpp: 15,877; makefile: 2,534; ansic: 1,233; sh: 77
file content (110 lines) | stat: -rw-r--r-- 3,016 bytes parent folder | download | duplicates (6)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Author: Andreas Tille <tille@debian.org>,
		Laszlo Kajan <lkajan@debian.org>
LastChanged: Sun, 07 Sep 2014 21:36:07 +0200
Description: Propagate hardening options

--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@
 prefix := /usr
 docdir := $(prefix)/share/doc/$(PACKAGE)
 
-CXXFLAGS := -DDEFAULT_PKGDATADIR=\"$(prefix)/share/disulfinder\"
+CXXFLAGS += -DDEFAULT_PKGDATADIR=\"$(prefix)/share/disulfinder\"
 export CXXFLAGS
 
 .PHONY: all
--- a/disulfind/src/Makefile
+++ b/disulfind/src/Makefile
@@ -1,5 +1,5 @@
 LIBS=-lCommon 
-LDFLAGS=-LCommon/
+LDFLAGS+=-LCommon/
 TARGETS=disulfinder disultrainer
 ifndef CXX
 CXX=g++
@@ -45,7 +45,7 @@
 all: SVM NN brnn disulfinder disultrainer
 
 %.o : %.cpp
-	$(CXX) $(CXXFLAGS) -c $< -o $@
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
 
 $(COMMONDIR)/libCommon.a: COMMON
 
--- a/disulfind/src/BRNN/Makefile
+++ b/disulfind/src/BRNN/Makefile
@@ -29,7 +29,7 @@
 LD            	= $(CXX) #$(LDFLAGS)
 
 .cpp.o:
-	$(CXX) $(CINCLUDES) $(CODEOPT) $(DEBUG) $(CXXFLAGS) $(PROFILE) -c $< -o $@
+	$(CXX) $(CINCLUDES) $(CODEOPT) $(DEBUG) $(CPPFLAGS) $(CXXFLAGS) $(PROFILE) -c $< -o $@
 SOURCES.cpp= \
 	$(RNNDIR)/Node.cpp \
 	$(RNNDIR)/StructureSearch.cpp \
@@ -65,7 +65,7 @@
 	$(LD) $(OBJECTS) disulfind-conn.o -o $@ $(PROFILE) $(LDFLAGS)
 
 disulfind-conn.o: $(SOURCES.cpp) disulfind-conn.cpp $(SOURCES.h)
-	$(CXX) $(CINCLUDES) $(WARNINGS) $(CODEOPT) $(DEBUG) $(CXXFLAGS) $(PROFILE) -c disulfind-conn.cpp
+	$(CXX) $(CINCLUDES) $(WARNINGS) $(CODEOPT) $(DEBUG) $(CPPFLAGS) $(CXXFLAGS) $(PROFILE) -c disulfind-conn.cpp
 
 clean:
 	rm -f *.o core
--- a/disulfind/src/Common/Makefile
+++ b/disulfind/src/Common/Makefile
@@ -18,7 +18,7 @@
 	g++ -o $@ $+ ${LIBS}
 
 %.o: %.cpp
-	g++ $(CXXFLAGS) -c $< -o $@
+	g++ $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
 
 clean:
 	$(MAKE) -C eig clean
--- a/disulfind/src/Common/eig/Makefile
+++ b/disulfind/src/Common/eig/Makefile
@@ -9,7 +9,7 @@
 	$(MAKELIB) ${TARGETLIB} $+
 
 %.o: %.c
-	g++ $(CXXFLAGS) -O3 -c $< -o $@
+	g++ $(CPPFLAGS) $(CXXFLAGS) -O3 -c $< -o $@
 
 clean:
 	rm *.o $(TARGETLIB) *~ -f 
--- a/disulfind/src/NN/Makefile
+++ b/disulfind/src/NN/Makefile
@@ -5,10 +5,10 @@
 all : brnn-train brnn-test
 
 %.standalone.o:%.cpp
-	g++ $(CXXFLAGS) -DSTANDALONE -c $< -o $@
+	g++ $(CPPFLAGS) $(CXXFLAGS) -DSTANDALONE -c $< -o $@
 
 %.o:%.cpp
-	g++ $(CXXFLAGS) -c $< -o $@
+	g++ $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
  
 brnn-train : multi-array.o array.o brnn-model.o brnn-train.standalone.o brnn-test.standalone.o 
 	g++ $(CXXFLAGS) -o brnn-train brnn-train.standalone.o brnn-model.o array.o multi-array.o $(LDFLAGS)
--- a/disulfind/src/SVM/Makefile
+++ b/disulfind/src/SVM/Makefile
@@ -1,6 +1,6 @@
 TARGETBIN = SVMClassifier
 OPT = -O3
-CXXFLAGS=$(OPT) $(CFLAGS) -Wno-deprecated 
+CXXFLAGS+=$(OPT) -Wno-deprecated 
 CXX = g++ 
 LIBS=-lCommon 
 LDFLAGS=-L../Common/
@@ -14,7 +14,7 @@
 	${CXX} -DSVMCLASSIFIER -c $< -o $@
 
 %.o : %.cpp
-	${CXX} -c $< -o $@ 
+	${CXX} $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ 
 
 clean:	
 	rm *~ *.o *.a *.exe ${TARGETBIN} -f