Skip to content

Commit 214a3c5

Browse files
keith-packardstephanosio
authored andcommitted
lib/libc: Add FULL_LIBC_SUPPORTED helper Kconfig symbol
This symbol is selected when the target has any full libc available. This allows tests to filter on this condition. It doesn't depend on whether the application actually selects that library, only whether requesting a full C library would work. Signed-off-by: Keith Packard <keithp@keithp.com>
1 parent 3ffde85 commit 214a3c5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Kconfig.zephyr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ config CODING_GUIDELINE_CHECK
316316

317317
config NATIVE_APPLICATION
318318
bool "Build as a native host application"
319+
select FULL_LIBC_SUPPORTED
319320
help
320321
Build as a native application that can run on the host and using
321322
resources and libraries provided by the host.

lib/libc/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ config REQUIRES_FULL_LIBC
1010
Select a C library implementation that provides a complete C library
1111
implementation, rather than the subset provided by MINIMAL_LIBC.
1212

13+
config FULL_LIBC_SUPPORTED
14+
bool
15+
help
16+
Selected when the target has at least one C library that offers a
17+
complete implementation and which would be selected when
18+
REQUIRES_FULL_LIBC is set.
19+
1320
config MINIMAL_LIBC_SUPPORTED
1421
bool
1522
default y
@@ -20,6 +27,7 @@ config NEWLIB_LIBC_SUPPORTED
2027
bool
2128
default y
2229
depends on "$(TOOLCHAIN_HAS_NEWLIB)" = "y"
30+
select FULL_LIBC_SUPPORTED
2331
help
2432
Selected when the target has support for the newlib C library
2533

0 commit comments

Comments
 (0)