-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add support for FreeBSD CURRENT (aka freebsd13) #1440
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
Currently, libc supports and detects freebsd11 and freebsd13 Unknown versions, like freebsd13, is treated as freebsd11. This patch solve the issues, detecting freebsd13 and treating it like freebsd12. Inverting the logic not(freebsd12) -> freebsd11 where possible
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
So this LGTM, @asomers what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The basic change looks good, as in it should allow libc-test to pass on FreeBSD 13. But it doesn't fix the greater underlying problem that libc still can't support multiple versions of FreeBSD, because cross compiles don't know which version to target.
ELAST
should not be exported at all, because it's not forward-compatible. Programs that use ELAST
won't be able to run correctly on newer versions of FreeBSD. The very few programs that need something like it should use the runtime constant sys_nerr
instead.
Are you planning to add new symbols from FreeBSD 13? If so, funlinkat, CNO_RTSDTR, EINTEGRITY, O_BENEATH, AT_BENEATH, FD_NONE, FIOBMAP2, PT_GET_SC_RET should probably all be added.
This patch has the only goal to allow me to have a libc up and running on FreeBSD 13 and I thought it was a good way to start contributing to this crate.
I can work to add the other FreeBSD13 symbols in a later patch. For the cross-compile problem, I've not a clear idea of how that could be solved. Maybe adding a feature to the crate, managed by |
Disable testing that thumbv6m-none-eabi builds properly
Update wasmtime to the latest master. The previous wasmtime revision is broken because one of its dependencies, `memoffset` 0.3, was yanked, which appears to make it unavailable. This was fixed by downgrading to `memoffset` 0.2.
Increase Redox & Relibc support - Add a lot of constants from relibc - Fix the timezone not found error found previously on Redox - Wrap WIFEXITED _et al._ in an unsafe block to match the rest of the API - Add support for the extra_traits feature and Redox - Fmt cc @jackpot51
@bors: r+ I think that, as long as freebsd11 and 12 are not broken, if this works for you, it is ok to merge. We should try setting up at least a build job for freebsd 13 to check that things don't stop building, but that can be done later (should be the next step though). At some point once there are freebsd 13 images available on cirrus-ci, we can start running the tests there. |
📌 Commit 72aa226 has been approved by |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
☔ The latest upstream changes (presumably #1438) made this pull request unmergeable. Please resolve the merge conflicts. |
This needs to be rebased |
Add support for hexagon-unknown-linux-musl
Currently, libc supports and detects freebsd11 and freebsd13 Unknown versions, like freebsd13, is treated as freebsd11. This patch solve the issues, detecting freebsd13 and treating it like freebsd12. Inverting the logic not(freebsd12) -> freebsd11 where possible
It appears that some ctest dependency is now failing to build on cirrus ci for some reason. |
I ran some tests and it seems that the extprim crate is broken using nightly |
Which dependency is pulling it? Maybe we can just remove that dependency somehow (this would be a ctest issue), it is weird that it only triggers on freebsd12 cirrus build job. |
extprim is needed by syntex_syntax2 that's needed by ctest. The error is of this form:
and it seems something related to macro, the |
So syntex_syntax2 requires extprim 1.0, https://github.com/gnzlbg/syntex/blob/master/syntex_syntax/Cargo.toml#L15 |
I suppose we could patch that to a |
1.0 and 1.6 fails to build, they all have the same macro... |
Is there something I can do to fix it? |
@bors: r+ |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit a3681f9 has been approved by |
Add support for FreeBSD CURRENT (aka freebsd13) Using the last FreeBSD-CURRENT (development snapshot) the libc build, but tests fail. This patch detects and supports FreeBSD CURRENT as freebsd13, and reworks the conditional compilation to use the `freebsd11` attribute instead of `not(freebsd12)` For now, freebsd13 is reusing all freebsd12 definitions, except for `ELAST` While here, add a new `errno`introduced in freebsd13
💔 Test failed - status-appveyor |
@bors: retry |
Isn't git history a bit messed up here? |
Add support for FreeBSD CURRENT (aka freebsd13) Using the last FreeBSD-CURRENT (development snapshot) the libc build, but tests fail. This patch detects and supports FreeBSD CURRENT as freebsd13, and reworks the conditional compilation to use the `freebsd11` attribute instead of `not(freebsd12)` For now, freebsd13 is reusing all freebsd12 definitions, except for `ELAST` While here, add a new `errno`introduced in freebsd13
💔 Test failed - status-azure |
@bors: r+ |
📌 Commit 154e58d has been approved by |
Add support for FreeBSD CURRENT (aka freebsd13) Using the last FreeBSD-CURRENT (development snapshot) the libc build, but tests fail. This patch detects and supports FreeBSD CURRENT as freebsd13, and reworks the conditional compilation to use the `freebsd11` attribute instead of `not(freebsd12)` For now, freebsd13 is reusing all freebsd12 definitions, except for `ELAST` While here, add a new `errno`introduced in freebsd13
☀️ Test successful - checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, status-azure |
Fix FreeBSD #1440 broke FreeBSD by changing `libc` FreeBSD targets to require a `cfg(freebsdXX)` to be defined, but not updating `build.rs` to define `freebsd11` when `LIBC_CI` is not available. Since `LIBC_CI` is always defined on CI, this issue went undetected. This PR fixes that issue in the `build.rs` and introduces a build task that tests FreeBSD without `LIBC_CI` on FreeBSD11, although I'm not sure this would have caught the issue in #1466 . Closes #1466 .
Using the last FreeBSD-CURRENT (development snapshot) the libc build, but tests fail.
This patch detects and supports FreeBSD CURRENT as freebsd13, and reworks the conditional compilation to use the
freebsd11
attribute instead ofnot(freebsd12)
For now, freebsd13 is reusing all freebsd12 definitions, except for
ELAST
While here, add a new
errno
introduced in freebsd13