diff --git a/makefiles/libc/newlib.mk b/makefiles/libc/newlib.mk index 7e09a10abc8b..41346ffff62e 100644 --- a/makefiles/libc/newlib.mk +++ b/makefiles/libc/newlib.mk @@ -88,11 +88,7 @@ ifeq ($(TOOLCHAIN),llvm) endif ifeq (1,$(USE_NEWLIB_NANO)) - NEWLIB_NANO_INCLUDE_PATTERNS ?= \ - $(NEWLIB_INCLUDE_DIR)/newlib-nano \ - $(NEWLIB_INCLUDE_DIR)/newlib/nano \ - $(NEWLIB_INCLUDE_DIR)/nano \ - # + NEWLIB_NANO_INCLUDE_PATTERNS ?= $(addprefix $(NEWLIB_INCLUDE_DIR)/, newlib-nano newlib/nano nano) NEWLIB_NANO_INCLUDE_DIR ?= $(firstword $(call dir_contains_newlib_h, $(NEWLIB_NANO_INCLUDE_PATTERNS))) # newlib-nano overrides newlib.h and its include dir should therefore go before