1
Fork 0

Apply suggestions from workingjubilee's code review

Co-authored-by: Jubilee <workingjubilee@gmail.com>
This commit is contained in:
knickish 2025-01-04 12:52:19 -06:00 committed by GitHub
parent 2287491480
commit 139ca10f65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 12 deletions

View file

@ -11,6 +11,8 @@ pub(crate) fn target() -> Target {
panic_strategy: PanicStrategy::Abort, panic_strategy: PanicStrategy::Abort,
code_model: Some(CodeModel::Medium), code_model: Some(CodeModel::Medium),
has_rpath: false, has_rpath: false,
// should be soft-float
llvm_floatabi: None,
..Default::default() ..Default::default()
}; };

View file

@ -2,7 +2,7 @@
**Tier: 3** **Tier: 3**
Motorola 680x0 Linux Bare metal Motorola 680x0
## Designated Developers ## Designated Developers
@ -12,15 +12,15 @@ Motorola 680x0 Linux
## Requirements ## Requirements
This target requires am m68k build environment for cross-compilation which This target requires an m68k build environment for cross-compilation which
is available on Debian and Debian-based systems, openSUSE and other distributions. is available on Debian, Debian-based systems, openSUSE, and other distributions.
On Debian, it should be sufficient to install a g++ cross-compiler for the m68k 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 architecture which will automatically pull in additional dependencies such as
the glibc cross development package: the glibc cross development package:
```text ```sh
# apt install g++-m68k-linux-gnu apt install g++-m68k-linux-gnu
``` ```
Binaries can be run using QEMU user emulation. On Debian-based systems, it should be Binaries can be run using QEMU user emulation. On Debian-based systems, it should be
@ -83,10 +83,10 @@ Currently there is no support to run the rustc test suite for this target.
Recommended `.cargo/config.toml`: Recommended `.cargo/config.toml`:
```toml ```toml
[unstable] [unstable]
build-std = ["panic_abort","core", "alloc"] build-std = ["panic_abort", "core", "alloc"]
[target.m68k-unknown-none-elf] [target.m68k-unknown-none-elf]
# there is no easily available non-linux m68k linker, so just use the linux one # as we're building for ELF, the m68k-linux linker should be adequate
linker = "m68k-linux-gnu-ld" linker = "m68k-linux-gnu-ld"
# the mold linker also supports m68k, remove the above line and uncomment the # the mold linker also supports m68k, remove the above line and uncomment the
@ -97,14 +97,14 @@ linker = "m68k-linux-gnu-ld"
Rust programs can be built for this target using: Rust programs can be built for this target using:
```text ```sh
cargo build --target m68k-unknown-none-elf cargo build --target m68k-unknown-none-elf
``` ```
Very simple programs can be run using the `qemu-m68k-static` program: Very simple programs can be run using the `qemu-m68k-static` program:
```text ```sh
$ qemu-m68k-static your-code qemu-m68k-static your-code
``` ```
For more complex applications, a chroot or native m68k system is required for testing. For more complex applications, a chroot or native m68k system is required for testing.

View file

@ -617,7 +617,6 @@ fn is_big_endian() {
("x86_64-unknown-linux-gnu", false), ("x86_64-unknown-linux-gnu", false),
("bpfeb-unknown-none", true), ("bpfeb-unknown-none", true),
("m68k-unknown-linux-gnu", true), ("m68k-unknown-linux-gnu", true),
("m68k-unknown-none-elf", true),
("aarch64_be-unknown-linux-gnu", true), ("aarch64_be-unknown-linux-gnu", true),
("powerpc64-unknown-linux-gnu", true), ("powerpc64-unknown-linux-gnu", true),
]; ];