Skip to content

Conversation

aescolar
Copy link
Member

@aescolar aescolar commented Sep 5, 2025

As it is possible to select some of these features without selecting the whole CONFIG_POSIX_API let's ensure we set NATIVE_LIBC_INCOMPATIBLE for them so when we build for native simulator based targets, we also use one of the embedded C libraries.

Relates to #95477 (fixes some issues which would be very similar to the original bug description)

As it is possible to select some of these features without selecting
the whole CONFIG_POSIX_API let's ensure we set NATIVE_LIBC_INCOMPATIBLE
for them so when we build for native simulator based targets, we also
use one of the embedded C libraries.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
Copy link

sonarqubecloud bot commented Sep 5, 2025

@aescolar aescolar changed the title posix: Ensure POSIX API subfeatures are not build with host libC posix: Ensure POSIX API subfeatures are not built with host libC Sep 5, 2025
@aescolar aescolar marked this pull request as ready for review September 11, 2025 10:53
@zephyrbot zephyrbot added the area: POSIX POSIX API Library label Sep 11, 2025
@zephyrbot zephyrbot requested review from cfriedt and ycsin September 11, 2025 10:54
@cfriedt
Copy link
Member

cfriedt commented Sep 11, 2025

The PR #88547 achieves approximately the same thing with POSIX_SYSTEM_INTERFACES selecting NATIVE_LIBC_INCOMPATIBLE.

C_LIB_EXT and C_LANG_R being the primary items that can still safely be used with the native libc (since they do not rely on POSIX system interfaces).

I will follow up on that PR with another that explicitly allows a compiler to choose to add the zephyr/posix include path as well.

If you have any input to the other PR, please feel free.

So not explicitly naking this, but it will just add more code churn if it is merged.

@aescolar
Copy link
Member Author

As you prefer

@aescolar aescolar closed this Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants