Skip to content

Commit 876bc25

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 <[email protected]>
1 parent b2d5065 commit 876bc25

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
@@ -34,6 +34,28 @@ config POSIX_AEP_CHOICE_NONE
3434
help
3535
No POSIX subprofile is selected.
3636

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

0 commit comments

Comments
 (0)