aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-08-25 06:36:06 +0000
committerJohn Crispin <blogic@openwrt.org>2014-08-25 06:36:06 +0000
commitc3738b4413a6fd6c9f715ca718462314dd126a1c (patch)
treeddc3a100bc63aa1715456acc1baf711d0ebb8938
parentc1333c560205359d25ce6894948d14ecca313c46 (diff)
downloadmaster-187ad058-c3738b4413a6fd6c9f715ca718462314dd126a1c.tar.gz
master-187ad058-c3738b4413a6fd6c9f715ca718462314dd126a1c.tar.bz2
master-187ad058-c3738b4413a6fd6c9f715ca718462314dd126a1c.zip
PKG_CHECK_FORMAT_SECURITY: add a menuconfig option, disable by default
The idea is still to enable it by default at some point I've tested all ar71xx packages (except oldpackages) using CONFIG_ALL=y Failing packages have been marked with PKG_CHECK_FORMAT_SECURITY:=0 for now I can test more targets but i have no idea which are the most used Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42282 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--config/Config-build.in9
-rw-r--r--include/package.mk8
2 files changed, 14 insertions, 3 deletions
diff --git a/config/Config-build.in b/config/Config-build.in
index 371ae7632a..02fe136791 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -93,6 +93,15 @@ menu "Global build settings"
If you are unsure, select N.
+ config PKG_CHECK_FORMAT_SECURITY
+ bool
+ prompt "Enable gcc format-security"
+ default n
+ help
+ Add -Wformat -Werror=format-security to the CFLAGS
+ You can disable this per package by adding
+ PKG_CHECK_FORMAT_SECURITY:=0 in the package Makefile
+
config PKG_BUILD_USE_JOBSERVER
bool
prompt "Use top-level make jobserver for packages"
diff --git a/include/package.mk b/include/package.mk
index 88ec3ef57f..1cdab6b447 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -14,7 +14,7 @@ PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
PKG_MD5SUM ?= unknown
PKG_BUILD_PARALLEL ?=
PKG_USE_MIPS16 ?= 1
-PKG_CHECK_FORMAT_SECURITY ?= 0
+PKG_CHECK_FORMAT_SECURITY ?= 1
ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) -j)
@@ -34,8 +34,10 @@ ifdef CONFIG_USE_MIPS16
TARGET_CFLAGS += -mips16 -minterlink-mips16
endif
endif
-ifeq ($(strip $(PKG_CHECK_FORMAT_SECURITY)),1)
- TARGET_CFLAGS += -Wformat -Werror=format-security
+ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY
+ ifeq ($(strip $(PKG_CHECK_FORMAT_SECURITY)),1)
+ TARGET_CFLAGS += -Wformat -Werror=format-security
+ endif
endif
include $(INCLUDE_DIR)/prereq.mk