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

Enable copy_file_range on FreeBSD #3023

Merged
merged 1 commit into from Dec 1, 2022
Merged

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Nov 30, 2022

PR #2479 did this, but only in the freebsd13 and freebsd14 modules, which was incorrect. Those modules should only be used for functions that change across FreeBSD versions, and therefore need different ELF symbol versions. Functions that were newly added since FreeBSD 11 can still go in the base freebsd module. It will cause no problems for them to be there, and users will see an error at link time if they try to use such a function in an environment that is too old to support it.

@rustbot
Copy link
Collaborator

rustbot commented Nov 30, 2022

r? @JohnTitor

(rustbot has picked a reviewer for you, use r? to override)

@asomers
Copy link
Contributor Author

asomers commented Nov 30, 2022

cc @devnexen

PR rust-lang#2479 did this, but only in the freebsd13 and freebsd14 modules,
which was incorrect.  Those modules should only be used for functions
that change across FreeBSD versions, and therefore need different ELF
symbol versions.  Functions that were newly added since FreeBSD 11 can
still go in the base freebsd module.  It will cause no problems for them
to be there, and users will see an error at link time if they try to
use such a function in an environment that is too old to support it.
@asomers
Copy link
Contributor Author

asomers commented Nov 30, 2022

This should fix CI on FreeBSD 12

@JohnTitor
Copy link
Member

Makes sense! @bors r+

@bors
Copy link
Contributor

bors commented Nov 30, 2022

📌 Commit 5756980 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 30, 2022

⌛ Testing commit 5756980 with merge 15d2795...

@bors
Copy link
Contributor

bors commented Dec 1, 2022

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing 15d2795 to master...

@bors bors merged commit 15d2795 into rust-lang:master Dec 1, 2022
@asomers asomers deleted the copy_file_range branch December 1, 2022 17:03
valpackett added a commit to valpackett/libc that referenced this pull request Feb 11, 2023
According to rust-lang#3023, new ABI did not need to be hidden away
under cfg(freebsdXX) flags, only changed ABI!
valpackett added a commit to valpackett/libc that referenced this pull request Feb 11, 2023
According to rust-lang#3023, new ABI did not need to be hidden away
under cfg(freebsdXX) flags, only changed ABI!
bors added a commit that referenced this pull request Feb 12, 2023
FreeBSD: move all new ABI to base module, add more O_ flags

So according to #3023 all of that stuff didn't need to be hidden away in these conditionally built modules and we could've been exposing `eventfd`, `getrandom`, `getentropy`, `setproctitle_fast` etc. to crates.io consumers all this time…
While in the test file, clean up the mess in `skip_fn` :)

Other thing we need to expose is `O_PATH`, `O_RESOLVE_BENEATH` for crates like cap-std/openat. While here, add other open flags.
tatref pushed a commit to tatref/libc that referenced this pull request Mar 20, 2023
According to rust-lang#3023, new ABI did not need to be hidden away
under cfg(freebsdXX) flags, only changed ABI!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants