summaryrefslogtreecommitdiffstats
path: root/payloads/libpayload/Makefile.inc
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-03-13 13:42:55 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-03-13 22:04:44 +0100
commitba949d32ba97d96422510967df33532dd39e47c0 (patch)
tree6be9a928830b3bc2e9801b967ef33adf0d391416 /payloads/libpayload/Makefile.inc
parent2def2625e0b49ea3ae85ae8b821979e5901c6638 (diff)
downloadcoreboot-ba949d32ba97d96422510967df33532dd39e47c0.tar.gz
coreboot-ba949d32ba97d96422510967df33532dd39e47c0.tar.bz2
coreboot-ba949d32ba97d96422510967df33532dd39e47c0.zip
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 <gabeblack@google.com> Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/2710 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/Makefile.inc')
-rw-r--r--payloads/libpayload/Makefile.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index 4c434a3d256f..b06288be5192 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