From ba949d32ba97d96422510967df33532dd39e47c0 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Wed, 13 Mar 2013 13:42:55 -0700 Subject: libpayload: Start using only internal and compiler headers. When building other payloads with lpgcc the -nostdinc flag was injected into CFLAGS, but when building libpayload itself some headers were being used from the host system. This change puts -nostdinc into the Makefile and xcompile script, fixes up one include path in include/inttypes.h, adds the compiler provided include directory to the include search path, and deletes the two now redundant stdint.h files. BUG=None TEST=With this and other changes, built libpayload and depthcharge for Daisy, Link, and Fox. BRANCH=None Change-Id: Ia7817fceab5297cd82ccc0d392330de0df61980e Signed-off-by: Gabe Black Signed-off-by: Ronald G. Minnich Reviewed-on: http://review.coreboot.org/2710 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/Makefile.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'payloads/libpayload/Makefile.inc') diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc index 4c434a3d25..b06288be51 100644 --- a/payloads/libpayload/Makefile.inc +++ b/payloads/libpayload/Makefile.inc @@ -58,8 +58,10 @@ subdirs-$(CONFIG_CURSES) += curses subdirs-$(CONFIG_CBFS) += libcbfs subdirs-$(CONFIG_LZMA) += liblzma -INCLUDES := -Iinclude -Iinclude/$(ARCHDIR-y) -I$(obj) -CFLAGS = $(EXTRA_CFLAGS) $(INCLUDES) -Os -pipe +CC_INCLUDE = $(shell $(CC) -print-search-dirs | head -n 1 | cut -d' ' -f2)include + +INCLUDES := -Iinclude -Iinclude/$(ARCHDIR-y) -I$(obj) -I$(CC_INCLUDE) +CFLAGS = $(EXTRA_CFLAGS) $(INCLUDES) -Os -pipe -nostdinc CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs CFLAGS += -Wstrict-aliasing -Wshadow -fno-builtin -- cgit v1.2.3