Use pre-ino64 FreeBSD symbols to resolve binary compatibility.#937
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 2, 2018
Merged
Use pre-ino64 FreeBSD symbols to resolve binary compatibility.#937bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
This follows the same method as other platforms like OSX and NetBSD. This will fix rustup and building from git (once libc is updated for bootstrap) on FreeBSD12 post-ino64 in freebsd/freebsd-src@f713b08. It also avoids having to hotpatch the stage0 compiler, and HOME/.cargo libc files on FreeBSD12 to build rust. The only real pitfall is that this will prevent interaction with inodes that have an ino_t above the 32-bit limit due to truncation. On the other hand Rust won't work at all on 12 without doing this currently. In general it should not be a problem for users and if they need 64-bit ino_t they can use a patched libc, rather than the current state of affairs in requiring a patched libc to use Rust on 12. A better, or complementary, approach would be something like proposed in rust-lang/rfcs#2048 to allow targetting a specific version of FreeBSD. This would allow Rust to default to this compatibility mode by targetting FreeBSD10 and still allow targetting FreeBSD12 for 64-bit ino_t. The symbol versions used were taken from the old version in freebsd/freebsd-src@f713b08#diff-61a32fcfb7ecd4517665fed591813c57 and freebsd/freebsd-src@f713b08#diff-7f67ccf8b5f44ff2f54eaab0207abb8d. The scope of functions versioned here differs from other platforms as not all structs were modified that were on others, such as DIR for `opendir`, `telldir`, etc. Only functions using dirent, stat, glob_t, and dev_t need the changes. Fixes rust-lang/rust#42681
|
(rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
asomers
approved these changes
Mar 2, 2018
Contributor
asomers
left a comment
There was a problem hiding this comment.
LGTM. This covers every function in FreeBSD's libc that was changed in 12, and that is already bound by the libc crate.
Member
Contributor
|
📌 Commit 78f9322 has been approved by |
Contributor
bors
added a commit
that referenced
this pull request
Mar 2, 2018
Use pre-ino64 FreeBSD symbols to resolve binary compatibility. This follows the same method as other platforms like OSX and NetBSD. This will fix rustup and building from git (once libc is updated for bootstrap) on FreeBSD12 post-ino64 in freebsd/freebsd-src@f713b08. It also avoids having to hotpatch the stage0 compiler, and HOME/.cargo libc files on FreeBSD12 to build rust. The only real pitfall is that this will prevent interaction with inodes that have an ino_t above the 32-bit limit due to truncation. On the other hand Rust won't work at all on 12 without doing this currently. In general it should not be a problem for users and if they need 64-bit ino_t they can use a patched libc, rather than the current state of affairs in requiring a patched libc to use Rust on 12. A better, or complementary, approach would be something like proposed in rust-lang/rfcs#2048 to allow targetting a specific version of FreeBSD. This would allow Rust to default to this compatibility mode by targetting FreeBSD10 and still allow targetting FreeBSD12 for 64-bit ino_t. The symbol versions used were taken from the old version in freebsd/freebsd-src@f713b08#diff-61a32fcfb7ecd4517665fed591813c57 and freebsd/freebsd-src@f713b08#diff-7f67ccf8b5f44ff2f54eaab0207abb8d. The scope of functions versioned here differs from other platforms as not all structs were modified that were on others, such as DIR for `opendir`, `telldir`, etc. Only functions using dirent, stat, glob_t, and dev_t need the changes. Fixes rust-lang/rust#42681
Contributor
|
☀️ Test successful - status-appveyor, status-travis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This follows the same method as other platforms like OSX and NetBSD.
This will fix rustup and building from git (once libc is updated for bootstrap)
on FreeBSD12 post-ino64 in freebsd/freebsd-src@f713b08.
It also avoids having to hotpatch the stage0 compiler, and HOME/.cargo
libc files on FreeBSD12 to build rust.
The only real pitfall is that this will prevent interaction with inodes that
have an ino_t above the 32-bit limit due to truncation. On the other hand
Rust won't work at all on 12 without doing this currently. In general
it should not be a problem for users and if they need 64-bit ino_t they
can use a patched libc, rather than the current state of affairs in
requiring a patched libc to use Rust on 12.
A better, or complementary, approach would be something like proposed in
rust-lang/rfcs#2048 to allow targetting a specific
version of FreeBSD. This would allow Rust to default to this compatibility
mode by targetting FreeBSD10 and still allow targetting FreeBSD12 for 64-bit
ino_t.
The symbol versions used were taken from the old version in
freebsd/freebsd-src@f713b08#diff-61a32fcfb7ecd4517665fed591813c57
and
freebsd/freebsd-src@f713b08#diff-7f67ccf8b5f44ff2f54eaab0207abb8d.
The scope of functions versioned here differs from other platforms as
not all structs were modified that were on others, such as DIR for
opendir,telldir, etc. Only functions using dirent, stat, glob_t,and dev_t need the changes.
Fixes rust-lang/rust#42681