diff options
Diffstat (limited to 'payloads/libpayload/Makefile.inc')
-rw-r--r-- | payloads/libpayload/Makefile.inc | 6 |
1 files changed, 4 insertions, 2 deletions
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 |