X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=config.mk;h=75bbac5c8d1d3d8065a4b9470c552f2ff095fd53;hb=63be111e72371b6edc6d02134dd785abb6be188c;hp=4dc350fe612695aef1217f71a39d0b3f93c3631b;hpb=592c5cabe78fe1cef4eb733904c81a9555d59a7e;p=people%2Fms%2Fu-boot.git diff --git a/config.mk b/config.mk index 4dc350fe61..75bbac5c8d 100644 --- 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 @@ -102,16 +105,18 @@ 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 +gccincdir := $(shell $(CC) -print-file-name=include) + CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \ -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) \ -I$(TOPDIR)/include \ - -fno-builtin \ - -pipe $(PLATFORM_CPPFLAGS) + -fno-builtin -ffreestanding -nostdinc -isystem \ + $(gccincdir) -pipe $(PLATFORM_CPPFLAGS) ifdef BUILD_TAG CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes \ @@ -120,6 +125,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)