Merge from rustc
This commit is contained in:
commit
2f3ee5dae5
630 changed files with 37490 additions and 8025 deletions
|
|
@ -60,6 +60,7 @@
|
|||
- [loongarch\*-unknown-linux-\*](platform-support/loongarch-linux.md)
|
||||
- [loongarch\*-unknown-none\*](platform-support/loongarch-none.md)
|
||||
- [m68k-unknown-linux-gnu](platform-support/m68k-unknown-linux-gnu.md)
|
||||
- [m68k-unknown-none-elf](platform-support/m68k-unknown-none-elf.md)
|
||||
- [mips64-openwrt-linux-musl](platform-support/mips64-openwrt-linux-musl.md)
|
||||
- [mipsel-sony-psx](platform-support/mipsel-sony-psx.md)
|
||||
- [mips\*-mti-none-elf](platform-support/mips-mti-none-elf.md)
|
||||
|
|
|
|||
|
|
@ -317,6 +317,7 @@ target | std | host | notes
|
|||
[`i686-wrs-vxworks`](platform-support/vxworks.md) | ✓ | | [^x86_32-floats-return-ABI]
|
||||
[`loongarch64-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | | LoongArch64 OpenHarmony
|
||||
[`m68k-unknown-linux-gnu`](platform-support/m68k-unknown-linux-gnu.md) | ? | | Motorola 680x0 Linux
|
||||
[`m68k-unknown-none-elf`](platform-support/m68k-unknown-none-elf.md) | | | Motorola 680x0
|
||||
`mips-unknown-linux-gnu` | ✓ | ✓ | MIPS Linux (kernel 4.4, glibc 2.23)
|
||||
`mips-unknown-linux-musl` | ✓ | | MIPS Linux with musl 1.2.3
|
||||
`mips-unknown-linux-uclibc` | ✓ | | MIPS Linux with uClibc
|
||||
|
|
|
|||
108
src/doc/rustc/src/platform-support/m68k-unknown-none-elf.md
Normal file
108
src/doc/rustc/src/platform-support/m68k-unknown-none-elf.md
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
# m68k-unknown-none-elf
|
||||
|
||||
**Tier: 3**
|
||||
|
||||
Bare metal Motorola 680x0
|
||||
|
||||
## Designated Developers
|
||||
|
||||
* [@knickish](https://github.com/knickish)
|
||||
|
||||
## Requirements
|
||||
|
||||
This target requires an m68k build environment for cross-compilation which
|
||||
is available on Debian, Debian-based systems, openSUSE, and other distributions.
|
||||
|
||||
On Debian-based systems, it should be sufficient to install a g++ cross-compiler for the m68k
|
||||
architecture which will automatically pull in additional dependencies such as
|
||||
the glibc cross development package:
|
||||
|
||||
```sh
|
||||
apt install g++-m68k-linux-gnu
|
||||
```
|
||||
|
||||
Binaries can be run using QEMU user emulation. On Debian-based systems, it should be
|
||||
sufficient to install the package `qemu-user-static` to be able to run simple static
|
||||
binaries:
|
||||
|
||||
```text
|
||||
# apt install qemu-user-static
|
||||
```
|
||||
|
||||
To run more complex programs, it will be necessary to set up a Debian/m68k chroot with
|
||||
the help of the command `debootstrap`:
|
||||
|
||||
```text
|
||||
# apt install debootstrap debian-ports-archive-keyring
|
||||
# debootstrap --keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg --arch=m68k unstable debian-68k http://ftp.ports.debian.org/debian-ports
|
||||
```
|
||||
|
||||
This chroot can then seamlessly entered using the normal `chroot` command thanks to
|
||||
QEMU user emulation:
|
||||
|
||||
```text
|
||||
# chroot /path/to/debian-68k
|
||||
```
|
||||
|
||||
To get started with native builds, which are currently untested, a native Debian/m68k
|
||||
system can be installed either on real hardware such as 68k-based Commodore Amiga or
|
||||
Atari systems or emulated environments such as QEMU version 4.2 or newer or ARAnyM.
|
||||
|
||||
ISO images for installation are provided by the Debian Ports team and can be obtained
|
||||
from the Debian CD image server available at:
|
||||
|
||||
[https://cdimage.debian.org/cdimage/ports/current](https://cdimage.debian.org/cdimage/ports/current/)
|
||||
|
||||
Documentation for Debian/m68k is available on the Debian Wiki at:
|
||||
|
||||
[https://wiki.debian.org/M68k](https://wiki.debian.org/M68k)
|
||||
|
||||
Support is available either through the `debian-68k` mailing list:
|
||||
|
||||
[https://lists.debian.org/debian-68k/](https://lists.debian.org/debian-68k/)
|
||||
|
||||
or the `#debian-68k` IRC channel on OFTC network.
|
||||
|
||||
## Building
|
||||
|
||||
At least llvm version `19.1.5` is required to build `core` and `alloc` for this target, and currently the gnu linker is required, as `lld` has no support for the `m68k` architecture
|
||||
|
||||
## Cross-compilation
|
||||
|
||||
This target can be cross-compiled from a standard Debian or Debian-based, openSUSE or any
|
||||
other distribution which has a basic m68k cross-toolchain available.
|
||||
|
||||
## Testing
|
||||
|
||||
Currently there is no support to run the rustc test suite for this target.
|
||||
|
||||
## Building Rust programs
|
||||
|
||||
Recommended `.cargo/config.toml`:
|
||||
```toml
|
||||
[unstable]
|
||||
build-std = ["panic_abort", "core", "alloc"]
|
||||
|
||||
[target.m68k-unknown-none-elf]
|
||||
# as we're building for ELF, the m68k-linux linker should be adequate
|
||||
linker = "m68k-linux-gnu-ld"
|
||||
|
||||
# the mold linker also supports m68k, remove the above line and uncomment the
|
||||
# following ones to use that instead
|
||||
# linker = "clang"
|
||||
# rustflags = ["-C", "link-arg=-fuse-ld=/path/to/mold/binary"]
|
||||
```
|
||||
|
||||
Rust programs can be built for this target using:
|
||||
|
||||
```sh
|
||||
cargo build --target m68k-unknown-none-elf
|
||||
```
|
||||
|
||||
Very simple programs can be run using the `qemu-m68k-static` program:
|
||||
|
||||
```sh
|
||||
qemu-m68k-static your-code
|
||||
```
|
||||
|
||||
For more complex applications, a chroot or native m68k system is required for testing.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# `emscripten-wasm-eh`
|
||||
|
||||
Use the WebAssembly exception handling ABI to unwind for the
|
||||
`wasm32-unknown-emscripten`. If compiling with this setting, the `emcc` linker
|
||||
should be invoked with `-fwasm-exceptions`. If linking with C/C++ files, the
|
||||
C/C++ files should also be compiled with `-fwasm-exceptions`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue