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

refine kernel compilation for threading modes #756

Merged
merged 3 commits into from
Nov 16, 2023
Merged

Conversation

mflatt
Copy link
Contributor

@mflatt mflatt commented Nov 16, 2023

The first commit is based on a suggestion from @owaddell. It changes configure to infer threaded or non-threaded C flags when a machine type is supplied. It also adjusts configure in smaller ways to avoid mismatches between specified and inferred configurations related to threading.

The second commit skips useless compilation of gc-par.c for non-threaded builds. This is done via the C preprocessor, instead of the makefile level, due to the way a non-threaded pb build may use a threaded host's configuration for compiling the kernel as a bootstrapping path.

The third commit fixes a bug related to S_make_mutex for tpb, especially on a 32-bit platform such as Wasm via Emscripten.

When a non-threaded machine type is specified directly without
`--nothreads`, don't add C compiler flags for threading.

Also, add more comments to `configure` to clarify the interplay of
host machine and pb, and chekck for consistency of `--[no]threads` and
an explicit machine type.
On a 32-bit platform, `ptr` is not the same as `void*` for tpb on a
32-bit platform, including Emscripten.
@mflatt mflatt merged commit 19cdad7 into cisco:main Nov 16, 2023
13 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.

2 participants