You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kamailio/debian/patches/hardening_flags.patch

29 lines
846 B

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)" >>$@