Package: webfs / 1.21+ds1-12

75_hardening_flags.diff Patch series | 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
Description: Pass compilation flags.
 Make sure that all of CPPFLAGS, CFLAGS,
 and LDFLAGS are used in the build process,
 since they are preload with values by us
 for hardening of the binary executable.
 .
 Remove the switch "-e" which does not work
 with dash.
Author: Mats Erik Andersson <debian@gisladisker.se>
Forwarded: not-needed
Last-Update: 2012-08-01

--- webfs-1.21+ds1.debian/GNUmakefile
+++ webfs-1.21+ds1/GNUmakefile
@@ -11,6 +11,8 @@
 CFLAGS	+= -D_GNU_SOURCE
 CFLAGS	+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 
+export CPPFLAGS CFLAGS LDFLAGS
+
 # default target
 all: build
 
--- webfs-1.21+ds1.debian/mk/Autoconf.mk
+++ webfs-1.21+ds1/mk/Autoconf.mk
@@ -132,7 +132,7 @@
 	@true
 
 Make.config: $(srcdir)/GNUmakefile
-	@echo -e "$(make-config-q)" > $@
+	@echo "$(make-config-q)" > $@
 	@echo
 	@echo "Make.config written, edit if needed"
 	@echo
--- webfs-1.21+ds1.debian/mk/Compile.mk
+++ webfs-1.21+ds1/mk/Compile.mk
@@ -20,7 +20,7 @@
 depfile		= mk/$(subst /,_,$*).dep
 depfiles	= mk/*.dep
 
-compile_c	= $(CC) $(CFLAGS) -Wp,-MD,$(tmpdep) -c -o $@ $<
+compile_c	= $(CC) $(CPPFLAGS) $(CFLAGS) -Wp,-MD,$(tmpdep) -c -o $@ $<
 compile_cc	= $(CXX) $(CXXFLAGS) -Wp,-MD,$(tmpdep) -c -o $@ $<
 fixup_deps	= sed -e "s|.*\.o:|$@:|" < $(tmpdep) > $(depfile) && rm -f $(tmpdep)
 cc_makedirs	= mkdir -p $(dir $@) $(dir $(depfile))