From d33dd06f738cf0fceae18761969f4ab5cf5e5ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= <joakim.nohlgard@eistec.se> Date: Tue, 20 Dec 2016 17:33:00 +0100 Subject: [PATCH] Revert "newlib: don't use -isystem for default includes" This reverts commit fb3c2b2bc9b5c70ea8399cefc7696e77044b7abb. The reverted commit broke Clang compilation. --- sys/newlib/Makefile.include | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/newlib/Makefile.include b/sys/newlib/Makefile.include index 5e425fc67f..94e526e0db 100644 --- a/sys/newlib/Makefile.include +++ b/sys/newlib/Makefile.include @@ -17,7 +17,6 @@ endif export LINKFLAGS += -lc -lnosys -ifeq (1,$(USE_NEWLIB_NANO)) # Search for Newlib include directories # Since Clang is not installed as a separate instance for each crossdev target @@ -51,10 +50,14 @@ NEWLIB_INCLUDE_DIR ?= $(firstword $(wildcard $(NEWLIB_INCLUDE_PATTERNS))) ifeq (,$(NEWLIB_INCLUDE_DIR)) NEWLIB_INCLUDE_DIR := $(abspath $(wildcard $(dir $(shell which $(PREFIX)gcc))../$(TARGET_ARCH)/include)) endif + +NEWLIB_INCLUDES := -isystem $(NEWLIB_INCLUDE_DIR) + +ifeq (1,$(USE_NEWLIB_NANO)) NEWLIB_NANO_INCLUDE_DIR ?= $(NEWLIB_INCLUDE_DIR)/nano # newlib-nano overrides newlib.h and its include dir should therefore go before # the regular newlib include dir. - NEWLIB_INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR) + NEWLIB_INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR) $(NEWLIB_INCLUDES) endif # Newlib includes should go before GCC includes. -- GitLab