add and apply debian_hardening_flags.patch

pull/1/head
Richard Fuchs 13 years ago
parent ccb89c6860
commit 8e410c916f

@ -564,6 +564,7 @@ config.mak: Makefile.defs
@echo "# this file is autogenerated by make cfg" >$@
@$(call mapf2,cfg_save_var,saved_fixed_vars,$(@))
@$(call mapf2,cfg_save_var2,saved_chg_vars,$(@))
@echo "CFLAGS += $(CPPFLAGS)" >>$@
@echo "override makefile_defs:=1" >>$@
@echo "C_DEFS:=\$$(filter-out \$$(DEFS_RM) \$$(extra_defs),\$$(C_DEFS))" \
"\$$(extra_defs)" >>$@

@ -858,8 +858,6 @@ ifeq ($(use_fast_lock), yes)
found_lock_method=yes
endif
CFLAGS=
LDFLAGS=
C_INCLUDES=
# setting CFLAGS
ifeq ($(mode), release)

@ -0,0 +1,28 @@
Description: Do pass hardening {C,CPP,LD}FLAGS
Author: Tzafrir Cohen <tzafrir@debian.org>
Make sure that the *FLAGS variables set by dpkg-buildflags make it to kamailio:
* add CPPFLAGS to CFLAGS
* Don't reset CFLAGS and LDFLAGS
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -855,8 +855,6 @@ ifeq ($(use_fast_lock), yes)
found_lock_method=yes
endif
-CFLAGS=
-LDFLAGS=
C_INCLUDES=
# setting CFLAGS
ifeq ($(mode), release)
--- a/Makefile
+++ b/Makefile
@@ -563,6 +563,7 @@ config.mak: Makefile.defs
@echo "# this file is autogenerated by make cfg" >$@
@$(call mapf2,cfg_save_var,saved_fixed_vars,$(@))
@$(call mapf2,cfg_save_var2,saved_chg_vars,$(@))
+ @echo "CFLAGS += $(CPPFLAGS)" >>$@
@echo "override makefile_defs:=1" >>$@
@echo "C_DEFS:=\$$(filter-out \$$(DEFS_RM) \$$(extra_defs),\$$(C_DEFS))" \
"\$$(extra_defs)" >>$@
Loading…
Cancel
Save