mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
makefiles/libc/newlibc: allow toolchains with nano version only
The check for `newlib-nano` assumes that a toolchain which provides `newlib-nano` provides both the normal version and the nano version of the `newlib`.The nano version of `newlib.h` is therefore stored in its own include directory. This is the case for toolchains which allow to use both the normal and the nano version, e.g. for ARM and RISC-V. However, if the toolchain provides `newlib_nano` but only allows the use of the nano version, it will only have the nano version of `newlib.h` and no separate directory for it, e.g. for ESP32. To still be able to use such toolchains with `newlib_nano`, the check is changed so that the setting of the `-isystem` option depends on the existence of the separate directory.
This commit is contained in:
parent
2520b5c608
commit
d6f86a9b7a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user