Skip to content
Snippets Groups Projects
Commit fb3c2b2b authored by Cenk Gündoğan's avatar Cenk Gündoğan
Browse files

newlib: don't use -isystem for default includes

parent e6ad438a
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ endif ...@@ -17,6 +17,7 @@ endif
export LINKFLAGS += -lc -lnosys export LINKFLAGS += -lc -lnosys
ifeq (1,$(USE_NEWLIB_NANO))
# Search for Newlib include directories # Search for Newlib include directories
# Since Clang is not installed as a separate instance for each crossdev target # Since Clang is not installed as a separate instance for each crossdev target
...@@ -50,14 +51,10 @@ NEWLIB_INCLUDE_DIR ?= $(firstword $(wildcard $(NEWLIB_INCLUDE_PATTERNS))) ...@@ -50,14 +51,10 @@ NEWLIB_INCLUDE_DIR ?= $(firstword $(wildcard $(NEWLIB_INCLUDE_PATTERNS)))
ifeq (,$(NEWLIB_INCLUDE_DIR)) ifeq (,$(NEWLIB_INCLUDE_DIR))
NEWLIB_INCLUDE_DIR := $(abspath $(wildcard $(dir $(shell which $(PREFIX)gcc))../$(TARGET_ARCH)/include)) NEWLIB_INCLUDE_DIR := $(abspath $(wildcard $(dir $(shell which $(PREFIX)gcc))../$(TARGET_ARCH)/include))
endif endif
NEWLIB_INCLUDES := -isystem $(NEWLIB_INCLUDE_DIR)
ifeq (1,$(USE_NEWLIB_NANO))
NEWLIB_NANO_INCLUDE_DIR ?= $(NEWLIB_INCLUDE_DIR)/nano NEWLIB_NANO_INCLUDE_DIR ?= $(NEWLIB_INCLUDE_DIR)/nano
# newlib-nano overrides newlib.h and its include dir should therefore go before # newlib-nano overrides newlib.h and its include dir should therefore go before
# the regular newlib include dir. # the regular newlib include dir.
NEWLIB_INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR) $(NEWLIB_INCLUDES) NEWLIB_INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR)
endif endif
# Newlib includes should go before GCC includes. # Newlib includes should go before GCC includes.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment