diff --git a/iscsi-scst/kernel/Makefile b/iscsi-scst/kernel/Makefile index 839764265..c68afabce 100644 --- a/iscsi-scst/kernel/Makefile +++ b/iscsi-scst/kernel/Makefile @@ -20,6 +20,9 @@ # # Note 2! The CFLAGS definitions are now in the main makefile. +cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ + > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) + EXTRA_CFLAGS += -I$(src)/../include -I$(SCST_INC_DIR) EXTRA_CFLAGS += -Wextra $(call cc-option,-Wno-old-style-declaration) \ -Wno-unused-parameter -Wno-missing-field-initializers