-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #101838 - matthiaskrgr:rollup-d1nm6b3, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #100415 (Add BE8 support) - #101559 (Adding "backtrace off" option for fuchsia targets) - #101740 (Adding ignore-fuchsia arg to non-applicable compiler ui tests) - #101778 (rustdoc: clean up DOM by removing `.dockblock-short p`) - #101786 (Tidy will not check coding style in bootstrap/target) - #101810 (Constify `PartialEq` for `Ordering`) - #101812 (rustdoc: clean up CSS `#titles` using flexbox) - #101820 (rustdoc: remove no-op rule `a { background: transparent }`) - #101828 (Add test for #101743) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
20 changed files
with
184 additions
and
80 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
compiler/rustc_target/src/spec/armeb_unknown_linux_gnueabi.rs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use crate::abi::Endian; | ||
use crate::spec::{Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
Target { | ||
llvm_target: "armeb-unknown-linux-gnueabi".into(), | ||
pointer_width: 32, | ||
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), | ||
arch: "arm".into(), | ||
options: TargetOptions { | ||
abi: "eabi".into(), | ||
features: "+strict-align,+v8,+crc".into(), | ||
endian: Endian::Big, | ||
max_atomic_width: Some(64), | ||
mcount: "\u{1}__gnu_mcount_nc".into(), | ||
..super::linux_gnu_base::opts() | ||
}, | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
74 changes: 74 additions & 0 deletions
74
src/doc/rustc/src/platform-support/armeb-unknown-linux-gnueabi.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# armeb-unknown-linux-gnueabi | ||
**Tier: 3** | ||
|
||
Target for cross-compiling Linux user-mode applications targetting the ARM BE8 architecture. | ||
|
||
## Overview | ||
BE8 architecture retains the same little-endian ordered code-stream used by conventional little endian ARM systems, however the data accesses are in big-endian. BE8 is used primarily in high-performance networking applications where the ability to read packets in their native "Network Byte Order" is important (many network protocols transmit data in big-endian byte order for their wire formats). | ||
|
||
## History | ||
BE8 architecture is the default big-endian architecture for ARM since [ARMv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en). It's predecessor, used for ARMv4 and ARMv5 devices was [BE32](https://developer.arm.com/documentation/dui0474/j/linker-command-line-options/--be32). On ARMv6 architecture, endianness can be configured via [system registers](https://developer.arm.com/documentation/ddi0290/g/unaligned-and-mixed-endian-data-access-support/mixed-endian-access-support/interaction-between-the-bus-protocol-and-the-core-endianness). However, BE32 was withdrawn for [ARMv7](https://developer.arm.com/documentation/ddi0406/cb/Appendixes/Deprecated-and-Obsolete-Features/Obsolete-features/Support-for-BE-32-endianness-model) onwards. | ||
|
||
## Target Maintainers | ||
* [@WorksButNotTested](https://github.com/WorksButNotTested) | ||
|
||
## Requirements | ||
The target is cross-compiled. This target supports `std` in the normal way (indeed only nominal changes are required from the standard ARM configuration). | ||
|
||
## Target definition | ||
The target definition can be seen [here](https://github.com/rust-lang/rust/tree/master/compiler/rustc_target/src/spec/armeb_unknown_linux_gnueabi.rs). In particular, it should be noted that the `features` specify that this target is built for the ARMv8 core. Though this can likely be modified as required. | ||
|
||
## Building the target | ||
Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this target. | ||
|
||
Therefore, you can build Rust with support for the target by adding it to the target list in config.toml, a sample configuration is shown below. It is expected that the user already have a working GNU compiler toolchain and update the paths accordingly. | ||
|
||
```toml | ||
[llvm] | ||
download-ci-llvm = false | ||
skip-rebuild = true | ||
optimize = true | ||
ninja = true | ||
targets = "ARM;X86" | ||
clang = false | ||
|
||
[build] | ||
target = ["x86_64-unknown-linux-gnu", "armeb-unknown-linux-gnueabi"] | ||
docs = false | ||
docs-minification = false | ||
compiler-docs = false | ||
[install] | ||
prefix = "/home/user/x-tools/rust/" | ||
|
||
[rust] | ||
debug-logging=true | ||
backtrace = true | ||
incremental = true | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
|
||
[dist] | ||
|
||
[target.armeb-unknown-linux-gnueabi] | ||
cc = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-gcc" | ||
cxx = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-g++" | ||
ar = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-ar" | ||
ranlib = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-ranlib" | ||
linker = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-gcc" | ||
llvm-config = "/home/user/x-tools/clang/bin/llvm-config" | ||
llvm-filecheck = "/home/user/x-tools/clang/bin/FileCheck" | ||
``` | ||
|
||
## Building Rust programs | ||
|
||
The following `.cargo/config` is needed inside any project directory to build for the BE8 target: | ||
|
||
```toml | ||
[build] | ||
target = "armeb-unknown-linux-gnueabi" | ||
|
||
[target.armeb-unknown-linux-gnueabi] | ||
linker = "armeb-unknown-linux-gnueabi-gcc" | ||
``` | ||
|
||
Note that it is expected that the user has a suitable linker from the GNU toolchain. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Regression test for https://github.com/rust-lang/rust/issues/101743 | ||
|
||
#![crate_name="foo"] | ||
|
||
pub type Word = usize; | ||
pub struct Repr<const B: usize>([i32; B]); | ||
pub struct IBig(usize); | ||
|
||
pub const fn base_as_ibig<const B: Word>() -> IBig { | ||
IBig(B) | ||
} | ||
|
||
impl<const B: Word> Repr<B> { | ||
// If we change back to rendering the value of consts, check this doesn't add | ||
// a <b> tag, but escapes correctly | ||
|
||
// @has foo/struct.Repr.html '//section[@id="associatedconstant.BASE"]/h4' '= _' | ||
pub const BASE: IBig = base_as_ibig::<B>(); | ||
} |
This file contains 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
Oops, something went wrong.