File: 200-hardening.patch

package info (click to toggle)
mgen 5.02.c%2Breally5.1.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,468 kB
  • sloc: cpp: 78,523; ansic: 4,169; python: 1,334; sh: 30; makefile: 18
file content (71 lines) | stat: -rw-r--r-- 2,547 bytes parent folder | download
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
Description: use hardening build flags
 One of the release goals for the next stable Debian release is
 to have as many packages use security hardening build flags as
 possible. This patch enables them as recommended by
 http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags
Author: Raoul Gunnar Borenius <borenius@dfn.de>
Forwarded: no
Last-Update: 2012-03-27
Reviewed-by: Simon Ruderich <simon@ruderich.org>
--- a/makefiles/Makefile.common
+++ b/makefiles/Makefile.common
@@ -15,6 +15,7 @@
 INCLUDES = $(SYSTEM_INCLUDES) -I$(UNIX) -I$(INCLUDE) -I$(PROTOLIB)/include
 
 CFLAGS = -g -DPROTO_DEBUG -DHAVE_GPS -DUNIX -Wall -Wcast-align -fPIC $(SYSTEM_HAVES) $(INCLUDES) $(ADDED_CFLAGS)
+CFLAGS += $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
 
 #CFLAGS = -g -fno-inline -DHAVE_PCAP -DPROTO_DEBUG -DHAVE_GPS -DUNIX -Wall -Wcast-align -pedantic  -fPIC $(SYSTEM_HAVES) $(INCLUDES) 
 
--- a/makefiles/Makefile.freebsd
+++ b/makefiles/Makefile.freebsd
@@ -7,6 +7,7 @@
 #
 SYSTEM_INCLUDES =  
 SYSTEM_LDFLAGS = -Wl,--as-needed
+SYSTEM_LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
 SYSTEM_LIBS = -pthread
 ####SYSTEM_LIBS = -lc_r
 
--- a/makefiles/Makefile.linux
+++ b/makefiles/Makefile.linux
@@ -8,6 +8,7 @@
 SYSTEM_INCLUDES = -I/usr/X11R6/include 
 SYSTEM_LDFLAGS = -L/usr/X11R6/lib 
 SYSTEM_LDFLAGS += -Wl,--as-needed
+SYSTEM_LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
 SYSTEM_LIBS = -ldl -lpthread -lpcap
 
 # 2) System specific capabilities
--- a/protolib/makefiles/Makefile.common
+++ b/protolib/makefiles/Makefile.common
@@ -16,6 +16,7 @@
 INCLUDES = $(TCL_INCL_PATH) $(SYSTEM_INCLUDES) -I../include -I/usr/include/libxml2
 
 CFLAGS = -g -DPROTO_DEBUG -DUNIX -D_FILE_OFFSET_BITS=64 -O $(SYSTEM_CFLAGS) $(SYSTEM_HAVES) $(INCLUDES) $(ADDED_CFLAGS)
+CFLAGS += $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
 
 LDFLAGS = $(SYSTEM_LDFLAGS)
 
--- a/protolib/makefiles/Makefile.freebsd
+++ b/protolib/makefiles/Makefile.freebsd
@@ -6,7 +6,7 @@
 #    (Where to find X11 libraries, etc)
 #
 SYSTEM_INCLUDES =  
-SYSTEM_LDFLAGS =  
+SYSTEM_LDFLAGS =  $(shell dpkg-buildflags --get LDFLAGS)
 SYSTEM_LIBS = -pthread
 ##SYSTEM_LIBS = -lc_r
 
--- a/protolib/makefiles/Makefile.linux
+++ b/protolib/makefiles/Makefile.linux
@@ -6,7 +6,7 @@
 # System specific additional libraries, include paths, etc
 #
 SYSTEM_INCLUDES = -I../include/unix
-SYSTEM_LDFLAGS =
+SYSTEM_LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
 SYSTEM_LIBS = -ldl -lrt
 
 # 6) System specific capabilities