Skip to content

Commit

Permalink
Merge pull request #9685 from cladmi/2018.07/pr/make/llvm/nano
Browse files Browse the repository at this point in the history
newlib.mk: llvm, fix newlib-nano header not used  [backport 2018.07]
  • Loading branch information
cladmi authored Aug 2, 2018
2 parents e34c417 + 270a0fe commit 8b9231c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions makefiles/libc/newlib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ ifeq ($(TOOLCHAIN),llvm)
# in case some header is missing from the cross tool chain
NEWLIB_INCLUDES := -isystem $(NEWLIB_INCLUDE_DIR) -nostdinc
NEWLIB_INCLUDES += $(addprefix -isystem ,$(abspath $(wildcard $(dir $(NEWLIB_INCLUDE_DIR))/usr/include)))

# Newlib includes should go before GCC includes. This is especially important
# when using Clang, because Clang will yield compilation errors on some GCC-
# bundled headers. Clang compatible versions of those headers are already
# provided by Newlib, so placing this directory first will eliminate those problems.
# The above problem was observed with LLVM 3.9.1 when building against GCC 6.3.0 headers.
INCLUDES := $(NEWLIB_INCLUDES) $(INCLUDES)
endif

ifeq (1,$(USE_NEWLIB_NANO))
Expand All @@ -79,10 +86,3 @@ ifeq (1,$(USE_NEWLIB_NANO))
# the regular system include dirs.
INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR) $(INCLUDES)
endif

# Newlib includes should go before GCC includes. This is especially important
# when using Clang, because Clang will yield compilation errors on some GCC-
# bundled headers. Clang compatible versions of those headers are already
# provided by Newlib, so placing this directory first will eliminate those problems.
# The above problem was observed with LLVM 3.9.1 when building against GCC 6.3.0 headers.
export INCLUDES := $(NEWLIB_INCLUDES) $(INCLUDES)

0 comments on commit 8b9231c

Please sign in to comment.