Skip to content
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

Add support for modular build structure. #264

Merged
merged 17 commits into from
Aug 28, 2024
Merged

Conversation

grafikrobot
Copy link
Member

@grafikrobot grafikrobot commented Jul 20, 2024

This is part of the effort to make the Boost libraries "modular" for build and consumption. See https://lists.boost.org/Archives/boost/2024/01/255704.php and https://github.com/grafikrobot/boost-b2-modular/blob/b2-modular/README.adoc for more information.

This PR depends on the following other PRs being merged to both develop and master branches of the respective repos:

This PR will be changed to ready for review, i.e. not draft, when the above are merged. Do not merge this one until that time.

grafikrobot and others added 17 commits March 11, 2024 08:31
This implements the required asm functions for sparc64_sysv_elf and
was tested on an OpenBSD/sparc64 system.

Jump_fcontext uses an extra C call frame to store the frame-pointer and
return address. Because of this the code is simply a save (to new reg
window), then forcing a window flush and finally switch stack and restore
from there.

Since jump_fcontext() uses a register window and stack frame, make_fcontext()
reserves two call frames on the stack (one for jump_fcontext() and the other
for the callback function).

OpenBSD/sparc64 uses stackghost which prevents userland from overriding the
return-address on the stack. Because of this make_fcontext() uses an extra
trampoline to implement the _exit(0) call if the callback returns.

All tests pass with this on OpenBSD/sparc64 (also the tests for fiber,
coroutine and coroutine2).
Without this test_fcontext.cpp fails on OpenBSD with a not-on-stack OS error.
@grafikrobot
Copy link
Member Author

Please review and merge this PR at your earliest convenience.

@olk
Copy link
Member

olk commented Aug 18, 2024

Please review and merge this PR at your earliest convenience.

Sorry - some checks are faling (11 failing and 12 successful checks)

@grafikrobot
Copy link
Member Author

The failures look unrelated to my changes. Especially since the checkout itself is failing.

@grafikrobot
Copy link
Member Author

@olk can you merge this #257 that fixes the CI setup please.

@olk olk merged commit 463cffe into boostorg:develop Aug 28, 2024
12 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants