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

Use pre-ino64 FreeBSD symbols to resolve binary compatibility. #937

Merged
merged 1 commit into from
Mar 2, 2018

Commits on Mar 1, 2018

  1. 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
    bdrewery committed Mar 1, 2018
    Configuration menu
    Copy the full SHA
    78f9322 View commit details
    Browse the repository at this point in the history