-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 new target armv7-unknown-linux-uclibceabi (softfloat) #92383
Add new target armv7-unknown-linux-uclibceabi (softfloat) #92383
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nagisa (or someone else) soon. Please see the contribution instructions for more information. |
|
Please copy the list of tier requirements from here to a comment on this PR and verify that each of the requirements are being satisfied. Please also add a file representing this target to the src/doc/rustc/src/platform-support directory. |
define TIOCGWINSZ as c_ulong under arm-uclibc. I'm trying to bring up a new target for rust, `armv7-unknown-linux-uclibceabi (softfloat)`. rust-lang/rust#92383 Looks like a lot of work has already been hashed out from the recent addition of `armv7-unknown-linux-uclibceabihf`. The only issue I'm currently seeing is when I encounter `TIOCGWINSZ` in a couple places. This is the error I see. ``` Compiling termize v0.1.1 (/mmc/.cargo/registry/src/github.com-1285ae84e5963aae/termize-0.1.1) error[E0277]: the trait bound `u32: From<i32>` is not satisfied --> src/platform/unix.rs:12:43 | 12 | let mut result = ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut window); | ----- ^^^^^^^^^^^^^^^^^ the trait `From<i32>` is not implemented for `u32` | | | required by a bound introduced by this call | = help: the following implementations were found: <u32 as From<Ipv4Addr>> <u32 as From<NonZeroU32>> <u32 as From<bool>> <u32 as From<char>> and 2 others = note: required because of the requirements on the impl of `Into<u32>` for `i32` error[E0277]: the trait bound `u32: From<i32>` is not satisfied ``` I see the error in the `termize` crate, and also `shell.rs` in the cargo source. My current fix is to define TIOCGWINSZ as c_ulong under arm-uclibc. I don't want to break anything with the established `armv7-unknown-linux-uclibceabihf` target so perhaps `@skrap` could chime in and take a look. Maybe a better solutions exists.
define TIOCGWINSZ as c_ulong under arm-uclibc. I'm trying to bring up a new target for rust, `armv7-unknown-linux-uclibceabi (softfloat)`. rust-lang/rust#92383 Looks like a lot of work has already been hashed out from the recent addition of `armv7-unknown-linux-uclibceabihf`. The only issue I'm currently seeing is when I encounter `TIOCGWINSZ` in a couple places. This is the error I see. ``` Compiling termize v0.1.1 (/mmc/.cargo/registry/src/github.com-1285ae84e5963aae/termize-0.1.1) error[E0277]: the trait bound `u32: From<i32>` is not satisfied --> src/platform/unix.rs:12:43 | 12 | let mut result = ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut window); | ----- ^^^^^^^^^^^^^^^^^ the trait `From<i32>` is not implemented for `u32` | | | required by a bound introduced by this call | = help: the following implementations were found: <u32 as From<Ipv4Addr>> <u32 as From<NonZeroU32>> <u32 as From<bool>> <u32 as From<char>> and 2 others = note: required because of the requirements on the impl of `Into<u32>` for `i32` error[E0277]: the trait bound `u32: From<i32>` is not satisfied ``` I see the error in the `termize` crate, and also `shell.rs` in the cargo source. My current fix is to define TIOCGWINSZ as c_ulong under arm-uclibc. I don't want to break anything with the established `armv7-unknown-linux-uclibceabihf` target so perhaps `@skrap` could chime in and take a look. Maybe a better solutions exists.
define TIOCGWINSZ as c_ulong under arm-uclibc. I'm trying to bring up a new target for rust, `armv7-unknown-linux-uclibceabi (softfloat)`. rust-lang/rust#92383 Looks like a lot of work has already been hashed out from the recent addition of `armv7-unknown-linux-uclibceabihf`. The only issue I'm currently seeing is when I encounter `TIOCGWINSZ` in a couple places. This is the error I see. ``` Compiling termize v0.1.1 (/mmc/.cargo/registry/src/github.com-1285ae84e5963aae/termize-0.1.1) error[E0277]: the trait bound `u32: From<i32>` is not satisfied --> src/platform/unix.rs:12:43 | 12 | let mut result = ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut window); | ----- ^^^^^^^^^^^^^^^^^ the trait `From<i32>` is not implemented for `u32` | | | required by a bound introduced by this call | = help: the following implementations were found: <u32 as From<Ipv4Addr>> <u32 as From<NonZeroU32>> <u32 as From<bool>> <u32 as From<char>> and 2 others = note: required because of the requirements on the impl of `Into<u32>` for `i32` error[E0277]: the trait bound `u32: From<i32>` is not satisfied ``` I see the error in the `termize` crate, and also `shell.rs` in the cargo source. My current fix is to define TIOCGWINSZ as c_ulong under arm-uclibc. I don't want to break anything with the established `armv7-unknown-linux-uclibceabihf` target so perhaps `@skrap` could chime in and take a look. Maybe a better solutions exists.
define TIOCGWINSZ as c_ulong under arm-uclibc. I'm trying to bring up a new target for rust, `armv7-unknown-linux-uclibceabi (softfloat)`. rust-lang/rust#92383 Looks like a lot of work has already been hashed out from the recent addition of `armv7-unknown-linux-uclibceabihf`. The only issue I'm currently seeing is when I encounter `TIOCGWINSZ` in a couple places. This is the error I see. ``` Compiling termize v0.1.1 (/mmc/.cargo/registry/src/github.com-1285ae84e5963aae/termize-0.1.1) error[E0277]: the trait bound `u32: From<i32>` is not satisfied --> src/platform/unix.rs:12:43 | 12 | let mut result = ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut window); | ----- ^^^^^^^^^^^^^^^^^ the trait `From<i32>` is not implemented for `u32` | | | required by a bound introduced by this call | = help: the following implementations were found: <u32 as From<Ipv4Addr>> <u32 as From<NonZeroU32>> <u32 as From<bool>> <u32 as From<char>> and 2 others = note: required because of the requirements on the impl of `Into<u32>` for `i32` error[E0277]: the trait bound `u32: From<i32>` is not satisfied ``` I see the error in the `termize` crate, and also `shell.rs` in the cargo source. My current fix is to define TIOCGWINSZ as c_ulong under arm-uclibc. I don't want to break anything with the established `armv7-unknown-linux-uclibceabihf` target so perhaps `@skrap` could chime in and take a look. Maybe a better solutions exists.
define TIOCGWINSZ as c_ulong under arm-uclibc. I'm trying to bring up a new target for rust, `armv7-unknown-linux-uclibceabi (softfloat)`. rust-lang/rust#92383 Looks like a lot of work has already been hashed out from the recent addition of `armv7-unknown-linux-uclibceabihf`. The only issue I'm currently seeing is when I encounter `TIOCGWINSZ` in a couple places. This is the error I see. ``` Compiling termize v0.1.1 (/mmc/.cargo/registry/src/github.com-1285ae84e5963aae/termize-0.1.1) error[E0277]: the trait bound `u32: From<i32>` is not satisfied --> src/platform/unix.rs:12:43 | 12 | let mut result = ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut window); | ----- ^^^^^^^^^^^^^^^^^ the trait `From<i32>` is not implemented for `u32` | | | required by a bound introduced by this call | = help: the following implementations were found: <u32 as From<Ipv4Addr>> <u32 as From<NonZeroU32>> <u32 as From<bool>> <u32 as From<char>> and 2 others = note: required because of the requirements on the impl of `Into<u32>` for `i32` error[E0277]: the trait bound `u32: From<i32>` is not satisfied ``` I see the error in the `termize` crate, and also `shell.rs` in the cargo source. My current fix is to define TIOCGWINSZ as c_ulong under arm-uclibc. I don't want to break anything with the established `armv7-unknown-linux-uclibceabihf` target so perhaps `@skrap` could chime in and take a look. Maybe a better solutions exists.
define TIOCGWINSZ as c_ulong under arm-uclibc. I'm trying to bring up a new target for rust, `armv7-unknown-linux-uclibceabi (softfloat)`. rust-lang/rust#92383 Looks like a lot of work has already been hashed out from the recent addition of `armv7-unknown-linux-uclibceabihf`. The only issue I'm currently seeing is when I encounter `TIOCGWINSZ` in a couple places. This is the error I see. ``` Compiling termize v0.1.1 (/mmc/.cargo/registry/src/github.com-1285ae84e5963aae/termize-0.1.1) error[E0277]: the trait bound `u32: From<i32>` is not satisfied --> src/platform/unix.rs:12:43 | 12 | let mut result = ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut window); | ----- ^^^^^^^^^^^^^^^^^ the trait `From<i32>` is not implemented for `u32` | | | required by a bound introduced by this call | = help: the following implementations were found: <u32 as From<Ipv4Addr>> <u32 as From<NonZeroU32>> <u32 as From<bool>> <u32 as From<char>> and 2 others = note: required because of the requirements on the impl of `Into<u32>` for `i32` error[E0277]: the trait bound `u32: From<i32>` is not satisfied ``` I see the error in the `termize` crate, and also `shell.rs` in the cargo source. My current fix is to define TIOCGWINSZ as c_ulong under arm-uclibc. I don't want to break anything with the established `armv7-unknown-linux-uclibceabihf` target so perhaps `@skrap` could chime in and take a look. Maybe a better solutions exists.
☔ The latest upstream changes (presumably #93220) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebase on Master |
Since submitting this pull request Fixed up some uclibc issues in libc crate. uclibc support was added to nix crate. I also added file representing this target to the src/doc/rustc/src/platform-support directory. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@nagisa Seems the CI is trying to execute my code snippet examples from my platform-support page? |
So am I going to be limited as to what I can put on my platform-support page? I spent many hours creating and editing the page with code samples to be the most helpful for anyone wanting to use this target. Seems when it's creating the doc it's parsing everything on the page and doesn't like some elements of the code samples. |
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 platform support pages are part of the rustc
book and as part of this the automated tests wants to check that every code is working (compiling, runnable, ...) this is done via rustdoc
who will analyze every markdown files and test every code block but rustdoc
assume by default that if a code block doesn't have a decorator it's a Rust code but in your case it's not. The fix is simple, you just need to add the text
decorator to tell rustdoc
that the code blocks aren't rust code.
* `apt update && apt install rust` | ||
|
||
If you bootstrap rust on your own using the project above, it will create a .deb file that you then can install with | ||
``` |
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.
``` | |
```text |
* Build the rust cross toochain using [rust-bootstrap-armv7-unknown-linux-uclibceabi](https://github.com/lancethepants/rust-bootstrap-armv7-unknown-linux-uclibceabi) or your own built toolchain. | ||
* Link your built toolchain with | ||
|
||
``` |
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.
``` | |
```text |
${HOME}/rust-bootstrap-armv7-unknown-linux-uclibceabi/src/rust/rust/build/x86_64-unknown-linux-gnu/stage2 | ||
``` | ||
* Build with: | ||
``` |
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.
``` | |
```text |
### Test with QEMU | ||
|
||
To test a cross-compiled binary on your build system follow the instructions for `Cross Compilation`, install `qemu-arm-static`, and run with the following. | ||
``` |
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.
``` | |
```text |
@bors r+ Thanks! |
📌 Commit 8c6f7fd has been approved by |
…clibceabi, r=nagisa Add new target armv7-unknown-linux-uclibceabi (softfloat) This adds the new target `armv7-unknown-linux-uclibceabi (softfloat)`. It is of course similar to `armv7-unknown-linux-uclibceabihf (hardfloat)` which was just recently added to rust except that it is `softfloat`. My interest lies in the Broadcom BCM4707/4708/BCM4709 family, notably found in some Netgear and Asus consumer routers. The armv7 Cortex-A9 cpus found in these devices do not have an fpu or NEON support. With this patch I've been able to bootstrap rustc, std and host tools `(extended = true)` to run on the target device for native compilation, allowing the target to be used as a development platform. With the recent addition of `armv7-unknown-linux-uclibceabihf (hardfloat)` it looks like many of the edge cases of using the uclibc c-library are getting worked out nicely. I've been able to compile some complex projects. Some patching still needed in some crates, but getting there for sure. I think `armv7-unknown-linux-uclibceabi` is ready to be a tier 3 target. I use a cross-toolchain from my project to bootstrap rust. https://github.com/lancethepants/tomatoware The goal of this project is to create a native development environment with support for various languages.
…askrgr Rollup of 9 pull requests Successful merges: - rust-lang#91939 (Clarify error on casting larger integers to char) - rust-lang#92300 (mips64-openwrt-linux-musl: Add Tier 3 target) - rust-lang#92383 (Add new target armv7-unknown-linux-uclibceabi (softfloat)) - rust-lang#92651 (Remove "up here" arrow on item-infos) - rust-lang#93556 (Change struct expr pretty printing to match rustfmt style) - rust-lang#93649 (Add regression tests for issue 80309) - rust-lang#93657 (Update CPU idle tracking for apple hosts) - rust-lang#93659 (Refactor conditional) - rust-lang#93669 (Resolve lifetimes for const generic defaults) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Pkgsrc changes: * Bump available bootstraps to 1.59.0. * Delete one patch which no longer applies, adjust another. Upstream changes: Version 1.60.0 (2022-04-07) ========================== Language -------- - [Stabilize `#[cfg(panic = "...")]` for either `"unwind"` or `"abort"`.] [93658] - [Stabilize `#[cfg(target_has_atomic = "...")]` for each integer size and `"ptr"`.][93824] Compiler -------- - [Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu`][86374] - [Fixes wrong `unreachable_pub` lints on nested and glob public reexport][87487] - [Stabilize `-Z instrument-coverage` as `-C instrument-coverage`][90132] - [Stabilize `-Z print-link-args` as `--print link-args`][91606] - [Add new Tier 3 target `mips64-openwrt-linux-musl`\*][92300] - [Add new Tier 3 target `armv7-unknown-linux-uclibceabi` (softfloat)\*][92383] - [Fix invalid removal of newlines from doc comments][92357] - [Add kernel target for RustyHermit][92670] - [Deny mixing bin crate type with lib crate types][92933] - [Make rustc use `RUST_BACKTRACE=full` by default][93566] - [Upgrade to LLVM 14][93577] \* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries --------- - [Guarantee call order for `sort_by_cached_key`][89621] - [Improve `Duration::try_from_secs_f32`/`f64` accuracy by directly processing exponent and mantissa][90247] - [Make `Instant::{duration_since, elapsed, sub}` saturating][89926] - [Remove non-monotonic clocks workarounds in `Instant::now`][89926] - [Make `BuildHasherDefault`, `iter::Empty` and `future::Pending` covariant][92630] Stabilized APIs --------------- - [`Arc::new_cyclic`][arc_new_cyclic] - [`Rc::new_cyclic`][rc_new_cyclic] - [`slice::EscapeAscii`][slice_escape_ascii] - [`<[u8]>::escape_ascii`][slice_u8_escape_ascii] - [`u8::escape_ascii`][u8_escape_ascii] - [`Vec::spare_capacity_mut`][vec_spare_capacity_mut] - [`MaybeUninit::assume_init_drop`][assume_init_drop] - [`MaybeUninit::assume_init_read`][assume_init_read] - [`i8::abs_diff`][i8_abs_diff] - [`i16::abs_diff`][i16_abs_diff] - [`i32::abs_diff`][i32_abs_diff] - [`i64::abs_diff`][i64_abs_diff] - [`i128::abs_diff`][i128_abs_diff] - [`isize::abs_diff`][isize_abs_diff] - [`u8::abs_diff`][u8_abs_diff] - [`u16::abs_diff`][u16_abs_diff] - [`u32::abs_diff`][u32_abs_diff] - [`u64::abs_diff`][u64_abs_diff] - [`u128::abs_diff`][u128_abs_diff] - [`usize::abs_diff`][usize_abs_diff] - [`Display for io::ErrorKind`][display_error_kind] - [`From<u8> for ExitCode`][from_u8_exit_code] - [`Not for !` (the "never" type)][not_never] - [_Op_`Assign<$t> for Wrapping<$t>`][wrapping_assign_ops] - [`arch::is_aarch64_feature_detected!`][is_aarch64_feature_detected] Cargo ----- - [Port cargo from `toml-rs` to `toml_edit`][cargo/10086] - [Stabilize `-Ztimings` as `--timings`][cargo/10245] - [Stabilize namespaced and weak dependency features.][cargo/10269] - [Accept more `cargo:rustc-link-arg-*` types from build script output.][cargo/10274] - [cargo-new should not add ignore rule on Cargo.lock inside subdirs][cargo/10379] Misc ---- - [Ship docs on Tier 2 platforms by reusing the closest Tier 1 platform docs][92800] - [Drop rustc-docs from complete profile][93742] - [bootstrap: tidy up flag handling for llvm build][93918] Compatibility Notes ------------------- - [Remove compiler-rt linking hack on Android][83822] - [Mitigations for platforms with non-monotonic clocks have been removed from `Instant::now`][89926]. On platforms that don't provide monotonic clocks, an instant is not guaranteed to be greater than an earlier instant anymore. - [`Instant::{duration_since, elapsed, sub}` do not panic anymore on underflow, saturating to `0` instead][89926]. In the real world the panic happened mostly on platforms with buggy monotonic clock implementations rather than catching programming errors like reversing the start and end times. Such programming errors will now results in `0` rather than a panic. - In a future release we're planning to increase the baseline requirements for the Linux kernel to version 3.2, and for glibc to version 2.17. We'd love your feedback in [PR #95026][95026]. Internal Changes ---------------- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools. - [Switch all libraries to the 2021 edition][92068] [83822]: rust-lang/rust#83822 [86374]: rust-lang/rust#86374 [87487]: rust-lang/rust#87487 [89621]: rust-lang/rust#89621 [89926]: rust-lang/rust#89926 [90132]: rust-lang/rust#90132 [90247]: rust-lang/rust#90247 [91606]: rust-lang/rust#91606 [92068]: rust-lang/rust#92068 [92300]: rust-lang/rust#92300 [92357]: rust-lang/rust#92357 [92383]: rust-lang/rust#92383 [92630]: rust-lang/rust#92630 [92670]: rust-lang/rust#92670 [92800]: rust-lang/rust#92800 [92933]: rust-lang/rust#92933 [93566]: rust-lang/rust#93566 [93577]: rust-lang/rust#93577 [93658]: rust-lang/rust#93658 [93742]: rust-lang/rust#93742 [93824]: rust-lang/rust#93824 [93918]: rust-lang/rust#93918 [95026]: rust-lang/rust#95026 [cargo/10086]: rust-lang/cargo#10086 [cargo/10245]: rust-lang/cargo#10245 [cargo/10269]: rust-lang/cargo#10269 [cargo/10274]: rust-lang/cargo#10274 [cargo/10379]: rust-lang/cargo#10379 [arc_new_cyclic]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_cyclic [rc_new_cyclic]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_cyclic [slice_escape_ascii]: https://doc.rust-lang.org/stable/std/slice/struct.EscapeAscii.html [slice_u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.escape_ascii [u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.escape_ascii [vec_spare_capacity_mut]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.spare_capacity_mut [assume_init_drop]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_drop [assume_init_read]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_read [i8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.abs_diff [i16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.abs_diff [i32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.abs_diff [i64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.abs_diff [i128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.abs_diff [isize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.abs_diff [u8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.abs_diff [u16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.abs_diff [u32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.abs_diff [u64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.abs_diff [u128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.abs_diff [usize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.abs_diff [display_error_kind]: https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#impl-Display [from_u8_exit_code]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html#impl-From%3Cu8%3E [not_never]: https://doc.rust-lang.org/stable/std/primitive.never.html#impl-Not [wrapping_assign_ops]: https://doc.rust-lang.org/stable/std/num/struct.Wrapping.html#trait-implementations [is_aarch64_feature_detected]: https://doc.rust-lang.org/stable/std/arch/macro.is_aarch64_feature_detected.html
Pkgsrc changes: * Bump available bootstraps to 1.59.0. * Adjust line number in patches which had non-zero offsets. Upstream changes: Version 1.60.0 (2022-04-07) =========================== Language -------- - [Stabilize `#[cfg(panic = "...")]` for either `"unwind"` or `"abort"`.] [93658] - [Stabilize `#[cfg(target_has_atomic = "...")]` for each integer size and `"ptr"`.][93824] Compiler -------- - [Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu`][86374] - [Fixes wrong `unreachable_pub` lints on nested and glob public reexport][87487] - [Stabilize `-Z instrument-coverage` as `-C instrument-coverage`][90132] - [Stabilize `-Z print-link-args` as `--print link-args`][91606] - [Add new Tier 3 target `mips64-openwrt-linux-musl`\*][92300] - [Add new Tier 3 target `armv7-unknown-linux-uclibceabi` (softfloat)\*][92383] - [Fix invalid removal of newlines from doc comments][92357] - [Add kernel target for RustyHermit][92670] - [Deny mixing bin crate type with lib crate types][92933] - [Make rustc use `RUST_BACKTRACE=full` by default][93566] - [Upgrade to LLVM 14][93577] \* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries --------- - [Guarantee call order for `sort_by_cached_key`][89621] - [Improve `Duration::try_from_secs_f32`/`f64` accuracy by directly processing exponent and mantissa][90247] - [Make `Instant::{duration_since, elapsed, sub}` saturating][89926] - [Remove non-monotonic clocks workarounds in `Instant::now`][89926] - [Make `BuildHasherDefault`, `iter::Empty` and `future::Pending` covariant][92630] Stabilized APIs --------------- - [`Arc::new_cyclic`][arc_new_cyclic] - [`Rc::new_cyclic`][rc_new_cyclic] - [`slice::EscapeAscii`][slice_escape_ascii] - [`<[u8]>::escape_ascii`][slice_u8_escape_ascii] - [`u8::escape_ascii`][u8_escape_ascii] - [`Vec::spare_capacity_mut`][vec_spare_capacity_mut] - [`MaybeUninit::assume_init_drop`][assume_init_drop] - [`MaybeUninit::assume_init_read`][assume_init_read] - [`i8::abs_diff`][i8_abs_diff] - [`i16::abs_diff`][i16_abs_diff] - [`i32::abs_diff`][i32_abs_diff] - [`i64::abs_diff`][i64_abs_diff] - [`i128::abs_diff`][i128_abs_diff] - [`isize::abs_diff`][isize_abs_diff] - [`u8::abs_diff`][u8_abs_diff] - [`u16::abs_diff`][u16_abs_diff] - [`u32::abs_diff`][u32_abs_diff] - [`u64::abs_diff`][u64_abs_diff] - [`u128::abs_diff`][u128_abs_diff] - [`usize::abs_diff`][usize_abs_diff] - [`Display for io::ErrorKind`][display_error_kind] - [`From<u8> for ExitCode`][from_u8_exit_code] - [`Not for !` (the "never" type)][not_never] - [_Op_`Assign<$t> for Wrapping<$t>`][wrapping_assign_ops] - [`arch::is_aarch64_feature_detected!`][is_aarch64_feature_detected] Cargo ----- - [Port cargo from `toml-rs` to `toml_edit`][cargo/10086] - [Stabilize `-Ztimings` as `--timings`][cargo/10245] - [Stabilize namespaced and weak dependency features.][cargo/10269] - [Accept more `cargo:rustc-link-arg-*` types from build script output.][cargo/10274] - [cargo-new should not add ignore rule on Cargo.lock inside subdirs][cargo/10379] Misc ---- - [Ship docs on Tier 2 platforms by reusing the closest Tier 1 platform docs][92800] - [Drop rustc-docs from complete profile][93742] - [bootstrap: tidy up flag handling for llvm build][93918] Compatibility Notes ------------------- - [Remove compiler-rt linking hack on Android][83822] - [Mitigations for platforms with non-monotonic clocks have been removed from `Instant::now`][89926]. On platforms that don't provide monotonic clocks, an instant is not guaranteed to be greater than an earlier instant anymore. - [`Instant::{duration_since, elapsed, sub}` do not panic anymore on underflow, saturating to `0` instead][89926]. In the real world the panic happened mostly on platforms with buggy monotonic clock implementations rather than catching programming errors like reversing the start and end times. Such programming errors will now results in `0` rather than a panic. - In a future release we're planning to increase the baseline requirements for the Linux kernel to version 3.2, and for glibc to version 2.17. We'd love your feedback in [PR #95026][95026]. Internal Changes ---------------- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools. - [Switch all libraries to the 2021 edition][92068] [83822]: rust-lang/rust#83822 [86374]: rust-lang/rust#86374 [87487]: rust-lang/rust#87487 [89621]: rust-lang/rust#89621 [89926]: rust-lang/rust#89926 [90132]: rust-lang/rust#90132 [90247]: rust-lang/rust#90247 [91606]: rust-lang/rust#91606 [92068]: rust-lang/rust#92068 [92300]: rust-lang/rust#92300 [92357]: rust-lang/rust#92357 [92383]: rust-lang/rust#92383 [92630]: rust-lang/rust#92630 [92670]: rust-lang/rust#92670 [92800]: rust-lang/rust#92800 [92933]: rust-lang/rust#92933 [93566]: rust-lang/rust#93566 [93577]: rust-lang/rust#93577 [93658]: rust-lang/rust#93658 [93742]: rust-lang/rust#93742 [93824]: rust-lang/rust#93824 [93918]: rust-lang/rust#93918 [95026]: rust-lang/rust#95026 [cargo/10086]: rust-lang/cargo#10086 [cargo/10245]: rust-lang/cargo#10245 [cargo/10269]: rust-lang/cargo#10269 [cargo/10274]: rust-lang/cargo#10274 [cargo/10379]: rust-lang/cargo#10379 [arc_new_cyclic]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_cyclic [rc_new_cyclic]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_cyclic [slice_escape_ascii]: https://doc.rust-lang.org/stable/std/slice/struct.EscapeAscii.html [slice_u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.escape_ascii [u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.escape_ascii [vec_spare_capacity_mut]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.spare_capacity_mut [assume_init_drop]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_drop [assume_init_read]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_read [i8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.abs_diff [i16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.abs_diff [i32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.abs_diff [i64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.abs_diff [i128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.abs_diff [isize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.abs_diff [u8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.abs_diff [u16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.abs_diff [u32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.abs_diff [u64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.abs_diff [u128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.abs_diff [usize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.abs_diff [display_error_kind]: https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#impl-Display [from_u8_exit_code]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html#impl-From%3Cu8%3E [not_never]: https://doc.rust-lang.org/stable/std/primitive.never.html#impl-Not [wrapping_assign_ops]: https://doc.rust-lang.org/stable/std/num/struct.Wrapping.html#trait-implementations [is_aarch64_feature_detected]: https://doc.rust-lang.org/stable/std/arch/macro.is_aarch64_feature_detected.html
This adds the new target
armv7-unknown-linux-uclibceabi (softfloat)
. It is of course similar toarmv7-unknown-linux-uclibceabihf (hardfloat)
which was just recently added to rust except that it issoftfloat
.My interest lies in the Broadcom BCM4707/4708/BCM4709 family, notably found in some Netgear and Asus consumer routers. The armv7 Cortex-A9 cpus found in these devices do not have an fpu or NEON support.
With this patch I've been able to bootstrap rustc, std and host tools
(extended = true)
to run on the target device for native compilation, allowing the target to be used as a development platform.With the recent addition of
armv7-unknown-linux-uclibceabihf (hardfloat)
it looks like many of the edge cases of using the uclibc c-library are getting worked out nicely. I've been able to compile some complex projects. Some patching still needed in some crates, but getting there for sure. I thinkarmv7-unknown-linux-uclibceabi
is ready to be a tier 3 target.I use a cross-toolchain from my project to bootstrap rust.
https://github.com/lancethepants/tomatoware
The goal of this project is to create a native development environment with support for various languages.