Skip to content

Commit 5c6a9c2

Browse files
committed
posix: profiles: add custom Zephyr POSIX subprofile
Add a custom Zephyr POSIX subprofile specifically for enabling the default features that Zephyr requires as per the coding guidelines. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
1 parent 9130004 commit 5c6a9c2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lib/posix/Kconfig.profile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,28 @@ config POSIX_AEP_CHOICE_NONE
3535
help
3636
No POSIX subprofile is selected.
3737

38+
config POSIX_AEP_CHOICE_ZEPHYR
39+
bool "Minimal Zephyr System Profile"
40+
select POSIX_C_LIB_EXT
41+
select POSIX_C_LANG_SUPPORT_R
42+
help
43+
Zephyr expects certain POSIX functions to be available throughout the build environment,
44+
such as gmtime_r(), strnlen(), strtok_r(), and possibly others.
45+
46+
These functions are divided into two standalone Option Groups that may be enabled
47+
independently of the remainder of the POSIX API implementation; namely POSIX_C_LIB_EXT and
48+
POSIX_C_LANG_SUPPORT_R. If not referenced by the Zephyr kernel or application, There are no
49+
resource implications for enabling these option groups.
50+
51+
Unlike pre-defined, standard POSIX subprofiles, this subprofile is custom to Zephyr and
52+
therefore does not need to include the base definitions or system interfaces that would
53+
otherwise be required for a conformant POSIX system or subprofile. This system profile
54+
does not itself meet the requirements for POSIX implementation conformance.
55+
56+
For more information, see
57+
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html
58+
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
59+
3860
config POSIX_AEP_CHOICE_BASE
3961
bool "Minimal POSIX System Profile"
4062
depends on POSIX_SYSTEM_INTERFACES

0 commit comments

Comments
 (0)