]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - Makefile.real
Merge branch 'refs/heads/t/invalid-ids'
[paraslash.git] / Makefile.real
index ef52c2eb99288cb80eceeb03c5f2c8635acf4983..464cd68ee2a1af044d0b09e36f4681db2a836aae 100644 (file)
@@ -115,7 +115,6 @@ STRICT_CFLAGS += -Wno-sign-compare -Wno-unknown-pragmas
 STRICT_CFLAGS += -Wformat -Wformat-security
 STRICT_CFLAGS += -Wmissing-format-attribute
 STRICT_CFLAGS += -Wdeclaration-after-statement
-STRICT_CFLAGS += -Wformat-signedness
 
 LDFLAGS += $(clock_gettime_ldflags)
 
@@ -129,6 +128,13 @@ ifeq ($(uname_s),Linux)
        LDFLAGS += -Wl,--gc-sections
 endif
 
+cc-option = $(shell \
+       $(CC) $(1) -Werror -c -x c /dev/null -o /dev/null > /dev/null 2>&1 \
+       && echo "$(1)" \
+)
+
+STRICT_CFLAGS += $(call cc-option, -Wformat-signedness)
+
 # To put more focus on warnings, be less verbose as default
 # Use 'make V=1' to see the full commands
 ifeq ("$(origin V)", "command line")