+ifeq ($(uname_s),Linux)
+ # these cause warnings on *BSD
+ CPPFLAGS += -Wunused-macros
+ STRICT_CFLAGS += -fdata-sections -ffunction-sections
+ STRICT_CFLAGS += -Wstrict-prototypes
+ STRICT_CFLAGS += -Wshadow
+ STRICT_CFLAGS += -Wunused -Wall
+ 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)
+