First steps implementing NAND support. Not working, fails to read ID.
[platform/kernel/u-boot.git] / config.mk
index ff83091..2c6cfb4 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -86,6 +86,12 @@ HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTSTRIP      = strip
 
 #########################################################################
+#
+# Option checker (courtesy linux kernel) to ensure
+# only supported compiler options are used
+#
+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 ;)
 
 #
 # Include the make variables (CC, etc...)
@@ -125,6 +131,10 @@ else
 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
 endif
 
+ifdef WILD_WILD_WEST
+CFLAGS := $(CFLAGS) -Werror
+endif
+
 # avoid trigraph warnings while parsing pci.h (produced by NIOS gcc-2.9)
 # this option have to be placed behind -Wall -- that's why it is here
 ifeq ($(ARCH),nios)