-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configs: enable libstdcxx-threads and libstdcxx-time via posix #722
Conversation
The added Until we have a stable interface based on ac_has_clock_monotonic=yes
ac_has_clock_realtime=yes
ac_has_nanosleep=yes
ac_has_sched_yield=yes Even hard-coding the above values might not work, in which case we will likely need to provide some modified means of configuration - e.g. manually using Eventually, we definitely do want to support target-based feature selection, such that we can set sane defaults via target |
ebfd6c5
to
7c26b4d
Compare
7c26b4d
to
9892d5f
Compare
34172b0
to
c72bf40
Compare
2b8f85b
to
65afb8b
Compare
Enable standard C++ threads and time functionality via Zephyr's POSIX API. Signed-off-by: Chris Friedt <[email protected]>
65afb8b
to
99fb253
Compare
@stephanosio, @keith-packard - The changes here should be just about sufficient to enable std::thread and friends. Cannot rely on compile or link tests here obviously (unless there was some kind of fake set up for Zephyr x-toolchain builds, which might be an option). I dropped a previous commit (see paste below) that polluted Those declarations should be in Any suggestions? https://github.com/zephyrproject-rtos/picolibc/blob/main/newlib/libc/machine/cris/include/pthread.h https://github.com/zephyrproject-rtos/newlib-cygwin/blob/zephyr-newlib-3.3.0/newlib/libc/include/pthread.h Note: These feature test macros should only be defined for the build. We cannot hard code them into an installed header, since Zephyr apps might disable POSIX support. |
It's too bad there are no actual instructions for building the SDK. E.g. the last time I had to change something in the SDK or otherwise build it from scratch, I needed to make a bash script for doing so. I'm able to build the SDK manually without issue using unmodified changes in this PR and in zephyrproject-rtos/gcc#25 . build.log.xz.txt ( Not 100% sure how to fix CI here, but it does not seem to be working. |
Closing this in favour of using the ISO C11 threads API, as there are fewer moving parts and Zephyr does not yet have a "kernel headers" package to use in constructing the toolchain (or a numeric syscall system / ABI). |
Enable standard C++ threads and time functionality via Zephyr's POSIX API.