diff --git a/makefiles/cflags.inc.mk b/makefiles/cflags.inc.mk index 160469fbc8..edd578b69d 100644 --- a/makefiles/cflags.inc.mk +++ b/makefiles/cflags.inc.mk @@ -25,21 +25,23 @@ ifeq ($(shell $(CC) -fno-delete-null-pointer-checks -E - 2>/dev/null >/dev/null endif endif +# Template for testing a compiler flag and adding it to CFLAGS (errors usually +# happens when using older toolchains which do not support the given flags) +define cflags_test_and_add + ifeq ($(shell $(CC) $(1) -E - 2>/dev/null >/dev/null /dev/null >/dev/null /dev/null >/dev/null