diff --git a/makefiles/libc/newlib.mk b/makefiles/libc/newlib.mk index 73ff4c238f..f27ee31407 100644 --- a/makefiles/libc/newlib.mk +++ b/makefiles/libc/newlib.mk @@ -94,11 +94,9 @@ ifeq (1,$(USE_NEWLIB_NANO)) $(NEWLIB_INCLUDE_DIR)/newlib/nano \ $(NEWLIB_INCLUDE_DIR)/nano)) - ifeq (,$(NEWLIB_NANO_INCLUDE_DIR)) - $(error USE_NEWLIB_NANO==1 but nano include folder not found!) + ifneq (,$(NEWLIB_NANO_INCLUDE_DIR)) + # newlib-nano overrides newlib.h and its include dir should therefore go before + # the regular system include dirs. + INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR) $(INCLUDES) endif - - # newlib-nano overrides newlib.h and its include dir should therefore go before - # the regular system include dirs. - INCLUDES := -isystem $(NEWLIB_NANO_INCLUDE_DIR) $(INCLUDES) endif