Skip to content

Commit

Permalink
newlib: don't use -isystem for default includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cenk Gündoğan committed Nov 7, 2016
1 parent e6ad438 commit fb3c2b2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sys/newlib/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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
Expand Down Expand Up @@ -50,14 +51,10 @@ 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)
NEWLIB_INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR)
endif

# Newlib includes should go before GCC includes.
Expand Down

0 comments on commit fb3c2b2

Please sign in to comment.