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

Add ARM MUSL targets #35060

Merged
merged 9 commits into from Jul 31, 2016
Merged

Add ARM MUSL targets #35060

merged 9 commits into from Jul 31, 2016

Commits on Jul 30, 2016

  1. Update gcc crate dependency to 0.3.27.

    This is to pull in changes to support ARM MUSL targets.
    
    This change also commits a couple of other cargo-generated changes
    to other dependencies in the various Cargo.toml files.
    timonvo authored and Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    57cad57 View commit details
    Browse the repository at this point in the history
  2. Add ARM MUSL targets.

    The targets are:
    - `arm-unknown-linux-musleabi`
    - `arm-unknown-linux-musleabihf`
    - `armv7-unknown-linux-musleabihf`
    
    These mirror the existing `gnueabi` targets.
    
    All of these targets produce fully static binaries, similar to the
    x86 MUSL targets.
    
    For now these targets can only be used with `--rustbuild` builds, as
    rust-lang/compiler-rt#22 only made the
    necessary compiler-rt changes in the CMake configs, not the plain
    GNU Make configs.
    
    I've tested these targets GCC 5.3.0 compiled again musl-1.1.12
    (downloaded from http://musl.codu.org/). An example `./configure`
    invocation is:
    
    ```
    ./configure \
        --enable-rustbuild
        --target=arm-unknown-linux-musleabi \
        --musl-root="$MUSL_ROOT"
    ```
    
    where `MUSL_ROOT` points to the `arm-linux-musleabi` prefix.
    Usually that path will be of the form
    `/foobar/arm-linux-musleabi/arm-linux-musleabi`.
    
    Usually the cross-compile toolchain will live under
    `/foobar/arm-linux-musleabi/bin`. That path should either by added
    to your `PATH` variable, or you should add a section to your
    `config.toml` as follows:
    
    ```
    [target.arm-unknown-linux-musleabi]
    cc = "/foobar/arm-linux-musleabi/bin/arm-linux-musleabi-gcc"
    cxx = "/foobar/arm-linux-musleabi/bin/arm-linux-musleabi-g++"
    ```
    
    As a prerequisite you'll also have to put a cross-compiled static
    `libunwind.a` library in `$MUSL_ROOT/lib`. This is similar to [how
    the x86_64 MUSL targets are built]
    (https://doc.rust-lang.org/book/advanced-linking.html).
    timonvo authored and Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    f7247d1 View commit details
    Browse the repository at this point in the history
  3. arm-musl targets now use cfg(env = "musl")

    Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    9ffd0fe View commit details
    Browse the repository at this point in the history
  4. arm-musl: set max_atomic_width

    Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    e50bcf3 View commit details
    Browse the repository at this point in the history
  5. arm-musl: statically link to libunwind

    Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    f0ec906 View commit details
    Browse the repository at this point in the history
  6. rustc_back/target: remove musl_base

    it's the same as linux_musl_base
    Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    b389537 View commit details
    Browse the repository at this point in the history
  7. remove some anys that are no longer necessary

    Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    ea00993 View commit details
    Browse the repository at this point in the history
  8. point the libc submodule back to rust-lang/libc

    Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    87fa075 View commit details
    Browse the repository at this point in the history
  9. return TargetResult

    Jorge Aparicio committed Jul 30, 2016
    Copy the full SHA
    eb61738 View commit details
    Browse the repository at this point in the history