sys/newlib: Add include path fallback for non-standard cross toolchain installation locations

pr/gpio
Joakim Nohlgård 7 years ago
parent 8baf8f839d
commit 44fee9fc12

@ -30,4 +30,10 @@ NEWLIB_INCLUDES ?= \
$(foreach pat, $(NEWLIB_INCLUDE_PATTERNS), $(wildcard $(pat))), \
-isystem $(dir))
# If nothing was found we will try to fall back to searching for a cross-gcc in
# the current PATH and use a relative path for the includes
ifeq (,$(NEWLIB_INCLUDES))
NEWLIB_INCLUDES := $(addprefix -isystem ,$(wildcard $(dir $(shell which $(PREFIX)gcc))../$(TARGET_TRIPLE)/include))
endif
export INCLUDES += $(NEWLIB_INCLUDES)

Loading…
Cancel
Save