From acc27139f66a9792a8a2e710ca5d14b88e6eb726 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 5 Sep 2024 15:07:07 -0400 Subject: build/flags: Use auto-detection for all warning flags --- build/flags.mk | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'build/flags.mk') diff --git a/build/flags.mk b/build/flags.mk index afe19bc..1421ce6 100644 --- a/build/flags.mk +++ b/build/flags.mk @@ -67,16 +67,7 @@ _CPPFLAGS += ${RELEASE_CPPFLAGS,${_RELEASE}} _CFLAGS += ${RELEASE_CFLAGS,${_RELEASE}} # Configurable flags -CFLAGS ?= \ - -g \ - -Wall \ - -Wformat=2 \ - -Werror=implicit \ - -Wimplicit-fallthrough \ - -Wmissing-declarations \ - -Wshadow \ - -Wsign-compare \ - -Wstrict-prototypes +CFLAGS ?= -g -Wall # Add the configurable flags last so they can override ours _CPPFLAGS += ${CPPFLAGS} ${EXTRA_CPPFLAGS} @@ -89,9 +80,16 @@ include build/exports.mk # Conditionally-supported flags AUTO_FLAGS := \ + gen/flags/Wformat.mk \ + gen/flags/Wimplicit-fallthrough.mk \ + gen/flags/Wimplicit.mk \ + gen/flags/Wmissing-decls.mk \ + gen/flags/Wmissing-var-decls.mk \ + gen/flags/Wshadow.mk \ + gen/flags/Wsign-compare.mk \ + gen/flags/Wstrict-prototypes.mk \ gen/flags/bind-now.mk \ - gen/flags/deps.mk \ - gen/flags/missing-var-decls.mk + gen/flags/deps.mk gen/flags.mk: ${AUTO_FLAGS} ${MSG} "[ GEN] $@" -- cgit v1.2.3