-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Add aarch64_be-unknown-linux-musl target #144551
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,34 @@ | ||||||||||
use rustc_abi::Endian; | ||||||||||
|
||||||||||
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base}; | ||||||||||
|
||||||||||
pub(crate) fn target() -> Target { | ||||||||||
let mut base = base::linux_musl::opts(); | ||||||||||
base.max_atomic_width = Some(128); | ||||||||||
base.supports_xray = true; | ||||||||||
base.features = "+v8a".into(); | ||||||||||
base.stack_probes = StackProbeType::Inline; | ||||||||||
base.supported_sanitizers = SanitizerSet::ADDRESS | ||||||||||
| SanitizerSet::CFI | ||||||||||
| SanitizerSet::LEAK | ||||||||||
| SanitizerSet::MEMORY | ||||||||||
| SanitizerSet::THREAD; | ||||||||||
|
||||||||||
Target { | ||||||||||
llvm_target: "aarch64_be-unknown-linux-musl".into(), | ||||||||||
metadata: TargetMetadata { | ||||||||||
description: Some("ARM64 Linux (big-endian) with musl-libc 1.2.5".into()), | ||||||||||
tier: Some(3), | ||||||||||
host_tools: Some(false), | ||||||||||
std: Some(true), | ||||||||||
}, | ||||||||||
pointer_width: 64, | ||||||||||
data_layout: "E-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(), | ||||||||||
arch: "aarch64".into(), | ||||||||||
options: TargetOptions { | ||||||||||
mcount: "\u{1}_mcount".into(), | ||||||||||
endian: Endian::Big, | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason the
|
||||||||||
..base | ||||||||||
}, | ||||||||||
} | ||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# aarch64_be-unknown-linux-musl | ||
|
||
**Tier: 3** | ||
|
||
ARM64 Linux (big-endian) with musl-libc. | ||
|
||
## Target maintainers | ||
|
||
[@neuschaefer](https://github.com/neuschaefer) | ||
[@Gelbpunkt](https://github.com/Gelbpunkt) | ||
|
||
## Requirements | ||
|
||
The target requires a `aarch64_be-*-linux-musl` toolchain, which likely has to | ||
be built from source because this is a rare combination. [Buildroot] provides | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just noticed that musl.cc/musl-cross-make includes an aarch64_be toolchain, which necessitates some rephrasing in this paragraph. |
||
a way of doing so: | ||
|
||
- select _Target options_ → _Target Architecture_ → _AArch64 (big endian)_ | ||
- select _Toolchain_ → _C library_ → _musl_ | ||
- select _Toolchain_ → _Enable C++ support_ | ||
|
||
Host tools are supported. | ||
|
||
[Buildroot]: https://buildroot.org/ | ||
|
||
|
||
## Building the target | ||
|
||
The target can be enabled in bootstrap.toml: | ||
|
||
```toml | ||
[build] | ||
target = ["aarch64_be-unknown-linux-musl"] | ||
|
||
[target.aarch64_be-unknown-linux-musl] | ||
cc = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-cc" | ||
cxx = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-c++" | ||
linker = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-cc" | ||
ar = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-ar" | ||
ranlib = "/path/to/buildroot/host/bin/aarch64_be-buildroot-linux-musl-ranlib" | ||
musl-root = "/path/to/buildroot/staging" | ||
crt-static = "/path/to/buildroot/target" | ||
``` | ||
|
||
|
||
## Testing | ||
|
||
Binaries can be run under `qemu-aarch64_be` or under a big-endian Linux kernel. |
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.
Should outline-atomics be included here, as per #144429?