]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - config.mk
Some minor fixes to environment in NAND code.
[karo-tx-uboot.git] / config.mk
index f73d6f4c90903fb3608701c56a1af345a3a579c9..d85ac36b5e602c3e80c67c8c5cb1d767f6f49680 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -59,6 +59,9 @@ endif
 ifdef  CPU
 sinclude $(TOPDIR)/cpu/$(CPU)/config.mk        # include  CPU  specific rules
 endif
+ifdef  SOC
+sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include  SoC  specific rules
+endif
 ifdef  VENDOR
 BOARDDIR = $(VENDOR)/$(BOARD)
 else
@@ -83,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...)
@@ -102,7 +111,7 @@ RELFLAGS= $(PLATFORM_RELFLAGS)
 DBGFLAGS= -g #-DDEBUG
 OPTFLAGS= -Os #-fomit-frame-pointer
 ifndef LDSCRIPT
-#LDSCRIPT := board/$(BOARDDIR)/u-boot.lds.debug
+#LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
 LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
 endif
 OBJCFLAGS += --gap-fill=0xff
@@ -122,6 +131,14 @@ else
 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
 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)
+ifeq ($(findstring 2.9,$(shell $(CC) --version)),2.9)
+CFLAGS := $(CPPFLAGS) -Wall -Wno-trigraphs
+endif
+endif
+
 AFLAGS_DEBUG := -Wa,-gstabs
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
@@ -150,6 +167,10 @@ BFD_ROOT_DIR =             /opt/powerpc
 endif
 endif
 
+ifeq ($(PCI_CLOCK),PCI_66M)
+CFLAGS := $(CFLAGS) -DPCI_66M
+endif
+
 #########################################################################
 
 export CONFIG_SHELL HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE \