toolchain: Have Kconfig NEWLIB_LIBC_NANO depend on toolchain support

Introduce HAS_NEWLIB_LIBC_NANO Kconfig option that the toolchain
specific Kconfig (gnuarmemb & zephyr 0.11) can select to convey that the
feature is supported.

This removes the need to if protect the NEWLIB_LIBC_NANO Kconfig with:

    if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "gnuarmemb"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-01-28 09:58:56 -06:00 committed by Kumar Gala
commit 6317c82f06
3 changed files with 6 additions and 2 deletions

View file

@ -5,3 +5,4 @@
config TOOLCHAIN_GNUARMEMB
def_bool y
select HAS_NEWLIB_LIBC_NANO

View file

@ -5,3 +5,4 @@
config TOOLCHAIN_ZEPHYR_0_11
def_bool y
select HAS_NEWLIB_LIBC_NANO

View file

@ -38,17 +38,19 @@ config EXTERNAL_LIBC
endchoice # LIBC_IMPLEMENTATION
config HAS_NEWLIB_LIBC_NANO
bool
if NEWLIB_LIBC
if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "gnuarmemb"
config NEWLIB_LIBC_NANO
bool "Build with newlib-nano C library"
depends on HAS_NEWLIB_LIBC_NANO
default y
help
Build with newlib-nano library, for small embedded apps.
The newlib-nano library for ARM embedded processors is a part of the
GNU Tools for ARM Embedded Processors.
endif
config NEWLIB_LIBC_ALIGNED_HEAP_SIZE
int "Newlib aligned heap size"