From 6557194fc5b5708ecc5654fe3a121b8fc4ac012b Mon Sep 17 00:00:00 2001 From: Michael LeMay Date: Tue, 15 Dec 2015 14:10:42 -0800 Subject: [PATCH] galileo: Revise include flags for LLVM Clang This patch revises the compiler flags when LLVM Clang is in use to cause Clang to automatically use its built-in header files rather than those for GCC. --- platform/galileo/Makefile.galileo | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/galileo/Makefile.galileo b/platform/galileo/Makefile.galileo index 189471fc2..8be977bc8 100644 --- a/platform/galileo/Makefile.galileo +++ b/platform/galileo/Makefile.galileo @@ -16,7 +16,12 @@ PROJECT_SOURCEFILES += newlib-syscalls.c CONTIKI_CPU=$(CONTIKI)/cpu/x86 include $(CONTIKI)/cpu/x86/Makefile.x86_quarkX1000 -CFLAGS += -fno-stack-protector -nostdinc -I$(LIBC)/include -isystem $(LIBGCC_PATH)/include -isystem $(LIBGCC_PATH)/include-fixed +CFLAGS += -fno-stack-protector -I$(LIBC)/include +ifeq (clang,$(findstring clang,$(CC))) + CFLAGS += -nostdlibinc +else + CFLAGS += -nostdinc -isystem $(LIBGCC_PATH)/include -isystem $(LIBGCC_PATH)/include-fixed +endif LDFLAGS += -nostdlib -L$(LIBC)/lib -L$(LIBGCC_PATH)/32 TARGET_LIBFILES += -lm -lc -lgcc