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

configure: improve inference of compiler flags for pb builds #829

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

mflatt
Copy link
Contributor

@mflatt mflatt commented Apr 23, 2024

A follow-up to #828

When building an pb variant like tpb64l, and even when building for a platform without native-code support, the "configure" script may still be able to infer suitable C compilation and linking flags for the kernel. For example, configuring with just -m=tpb64l on ppc64l Linux should pick up good compiler and linker flags.

An --os=... flag can override inference in "configure" in case it's not correct, which might be needed for cross compilation of pb variants.

With these changes, -m=pb by itself is now equivalent to --pb, instead of triggering an error to say that --pb must be used. Using -m=pb is not equivalent to --pb in all cases, since --pb --threads is like -m=tpb, but -m=pb --threads would be an error due to the mismatch between an explicit pb machine type and --threads flag. The interactions are subtle, but I'm hopeful that "configure" now does the right thing in more cases.

When building an pb variant like `tpb64l`, and even when building for
a platform without native-code support, the "configure" script may
still be able to infer suitable C compilation and linking flags for
the kernel. Add an `--os=...` flag that can be used to override that
inference in case it's not correct (as in the case of cross
compilation).
@nmeum
Copy link
Contributor

nmeum commented Apr 25, 2024

This look great, thanks for following up on this! Should make it easier for us to support portable bytecode targets downstream :)

@mflatt mflatt merged commit ad064de into cisco:main Apr 26, 2024
15 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