From 87326c7b779bc331134f79258b77f2b7be5a3b7a Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 8 Mar 2019 18:47:23 +0100 Subject: [PATCH] make: newlib: check if newlib nano folder was found --- makefiles/libc/newlib.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makefiles/libc/newlib.mk b/makefiles/libc/newlib.mk index 916105657e..ca6a1cb864 100644 --- a/makefiles/libc/newlib.mk +++ b/makefiles/libc/newlib.mk @@ -93,6 +93,11 @@ ifeq (1,$(USE_NEWLIB_NANO)) NEWLIB_NANO_INCLUDE_DIR ?= $(firstword $(wildcard $(NEWLIB_INCLUDE_DIR)/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!) + 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)