[OpenWrt-Devel] [PATCH 3/3] Introduce PKG_CHECK_FORMAT_SECURITY
etienne.champetier at free.fr
etienne.champetier at free.fr
Tue Jun 24 17:11:43 EDT 2014
patch for package feed ready to merge
https://github.com/openwrt/packages/pull/57
----- Mail original -----
> De: "Etienne CHAMPETIER" <etienne.champetier at free.fr>
> À: openwrt-devel at lists.openwrt.org
> Cc: "Etienne CHAMPETIER" <etienne.champetier at free.fr>
> Envoyé: Mardi 24 Juin 2014 18:12:47
> Objet: [PATCH 3/3] Introduce PKG_CHECK_FORMAT_SECURITY
>
> The idea is to get rid of
> http://en.wikipedia.org/wiki/Uncontrolled_format_string
> by using "-Wformat -Werror=format-security" by default
>
> Signed-off-by: Etienne CHAMPETIER <etienne.champetier at free.fr>
> ---
> include/package.mk | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/include/package.mk b/include/package.mk
> index f7da9e3..7d75f08 100644
> --- a/include/package.mk
> +++ b/include/package.mk
> @@ -14,6 +14,7 @@ PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
> PKG_MD5SUM ?= unknown
> PKG_BUILD_PARALLEL ?=
> PKG_USE_MIPS16 ?= 1
> +PKG_CHECK_FORMAT_SECURITY ?= 1
>
> ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
> MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) -j)
> @@ -33,6 +34,9 @@ ifdef CONFIG_USE_MIPS16
> TARGET_CFLAGS += -mips16 -minterlink-mips16
> endif
> endif
> +ifeq ($(strip $(PKG_CHECK_FORMAT_SECURITY)),1)
> + TARGET_CFLAGS += -Wformat -Werror=format-security
> +endif
>
> include $(INCLUDE_DIR)/prereq.mk
> include $(INCLUDE_DIR)/host.mk
> --
> 1.7.1
>
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list