-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix build on systems with ucontext.h implemented outside the libc #900
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
Conversation
The ucontext.h API may be implemented outside the libc.
|
Hi @ismaell, we have thread-based implementation of resumable tasks. What do you think if we enable such implementation in case where ucontext is absented? (Use libc or thread-based) |
|
Ah, that's even better. |
|
Could I ask to do such change in your patch? You simply need to define this macro - |
|
@ismaell do you have a chance to update PR with proposed changes or we should create separate PR for this? |
Please do. I ran into this trying to build TBB on OpenBSD, which does not have ucontext. Also I see Haiku does not as well. I tried building mold which has TBB embedded with CFLAGS / CXXFLAGS with To me with how long ucontext has been removed from POSIX, I don't know why TBB doesn't just use the thread-based code path. |
@pavelkumbrasev Can you please try to come up with a diff that checks for ucontext and enables the thread-based implementation if it does not exist? I can help test if you would like. |
|
@brad0 Basically, you could submit a separate PR that implements proposed approach since there is no progress in this PR. |
|
Closing it since #1055 was merged. |
Description
Check for the
libucontextpackage. Theucontext.hAPI may be implemented outside the libc.Without this patch the build seems to succeed but results in under-linking.
Type of change
Add a respective label(s) to PR if you have permissions
Tests
Documentation
Breaks backward compatibility
Notify the following users
Other information