Merge pull request #6065 from cgundogan/pr/cpp_pls_do_not_use_isystem_for_default_includes
newlib: don't use -isystem for default includes
This commit is contained in:
commit
6d80df1a8d
@ -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)))
|
|||||||
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.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user