aboutsummaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-04-25 08:06:40 +0000
committerWolfgang Denk <wd@denx.de>2011-07-26 16:35:50 +0200
commit6262e4e74e2cdb9f231dc71c9893d4a4bd1e88df (patch)
tree4d27d453958611a7f236842605c406285bae5547 /config.mk
parente84ffddbced7620aa9fe4b9e8bfffb6a994c7b4e (diff)
disable security warning flags when possible
Some toolchains enable security warning flags by default, but these don't really make sense in the u-boot world. Such as forcing changes like: -printf(foo); +printf("%s", foo); So disable the flags when the compiler supports them. Linux has already merged a similar change in their build system. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.mk b/config.mk
index ed44d03ad..e2b440d8b 100644
--- a/config.mk
+++ b/config.mk
@@ -211,6 +211,10 @@ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
endif
CFLAGS += $(call cc-option,-fno-stack-protector)
+# Some toolchains enable security related warning flags by default,
+# but they don't make much sense in the u-boot world, so disable them.
+CFLAGS += $(call cc-option,-Wno-format-nonliteral)
+CFLAGS += $(call cc-option,-Wno-format-security)
# $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
# option to the assembler.