1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

newlib: Place newlib includes before compiler includes

This commit is contained in:
Joakim Nohlgård 2017-02-14 20:35:12 +01:00
parent 0858a3ea8c
commit 0686538218

View File

@ -68,5 +68,9 @@ ifeq (1,$(USE_NEWLIB_NANO))
INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR) $(INCLUDES)
endif
# Newlib includes should go after GCC includes.
export INCLUDES += $(NEWLIB_INCLUDES)
# 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)