summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-31 02:28:11 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-31 02:28:11 +0000
commite73b1211737842732951f9b9049294ef732e1ef0 (patch)
treeb3be676ef76013c2537aa1b26063a6db3e34e05f
parent0cc50b53fcf0c211814a22c0e47f8cd8d0df2794 (diff)
make the extra warnings optional
-rw-r--r--Rules.mak2
-rw-r--r--extra/Configs/Config.in6
2 files changed, 8 insertions, 0 deletions
diff --git a/Rules.mak b/Rules.mak
index f439baba4..8cffc323d 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -295,10 +295,12 @@ OPTIMIZATION+=$(call check_gcc,-funit-at-a-time,)
# Add a bunch of extra pedantic annoyingly strict checks
XWARNINGS=$(subst ",, $(strip $(WARNINGS))) -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
+ifeq ($(EXTRA_WARNINGS),y)
XWARNINGS+=-Wnested-externs -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wformat=2
XWARNINGS+=-Wmissing-prototypes -Wmissing-declarations
# works only w/ gcc-3.4 and up, can't be checked for gcc-3.x w/ check_gcc()
#XWARNINGS+=-Wdeclaration-after-statement
+endif
XARCH_CFLAGS=$(subst ",, $(strip $(ARCH_CFLAGS)))
CPU_CFLAGS=$(subst ",, $(strip $(CPU_CFLAGS-y)))
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index c979408ae..e2259d022 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -1450,6 +1450,12 @@ config WARNINGS
help
Set this to the set of gcc warnings you wish to see while compiling.
+config EXTRA_WARNINGS
+ bool "Enable extra annoying warnings"
+ default n
+ help
+ If you wish to build with extra warnings enabled, say Y here.
+
config DOMULTI
bool "Compile all sources at once into an object"
default n