Apply suggestions from workingjubilee's code review
Co-authored-by: Jubilee <workingjubilee@gmail.com>
This commit is contained in:
parent
2287491480
commit
139ca10f65
3 changed files with 13 additions and 12 deletions
|
@ -11,6 +11,8 @@ pub(crate) fn target() -> Target {
|
|||
panic_strategy: PanicStrategy::Abort,
|
||||
code_model: Some(CodeModel::Medium),
|
||||
has_rpath: false,
|
||||
// should be soft-float
|
||||
llvm_floatabi: None,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
**Tier: 3**
|
||||
|
||||
Motorola 680x0 Linux
|
||||
Bare metal Motorola 680x0
|
||||
|
||||
## Designated Developers
|
||||
|
||||
|
@ -12,15 +12,15 @@ Motorola 680x0 Linux
|
|||
|
||||
## Requirements
|
||||
|
||||
This target requires am m68k build environment for cross-compilation which
|
||||
is available on Debian and Debian-based systems, openSUSE and other distributions.
|
||||
This target requires an m68k build environment for cross-compilation which
|
||||
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
|
||||
the glibc cross development package:
|
||||
|
||||
```text
|
||||
# apt install g++-m68k-linux-gnu
|
||||
```sh
|
||||
apt install g++-m68k-linux-gnu
|
||||
```
|
||||
|
||||
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`:
|
||||
```toml
|
||||
[unstable]
|
||||
build-std = ["panic_abort","core", "alloc"]
|
||||
build-std = ["panic_abort", "core", "alloc"]
|
||||
|
||||
[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"
|
||||
|
||||
# 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:
|
||||
|
||||
```text
|
||||
```sh
|
||||
cargo build --target m68k-unknown-none-elf
|
||||
```
|
||||
|
||||
Very simple programs can be run using the `qemu-m68k-static` program:
|
||||
|
||||
```text
|
||||
$ qemu-m68k-static your-code
|
||||
```sh
|
||||
qemu-m68k-static your-code
|
||||
```
|
||||
|
||||
For more complex applications, a chroot or native m68k system is required for testing.
|
||||
|
|
|
@ -617,7 +617,6 @@ fn is_big_endian() {
|
|||
("x86_64-unknown-linux-gnu", false),
|
||||
("bpfeb-unknown-none", true),
|
||||
("m68k-unknown-linux-gnu", true),
|
||||
("m68k-unknown-none-elf", true),
|
||||
("aarch64_be-unknown-linux-gnu", true),
|
||||
("powerpc64-unknown-linux-gnu", true),
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue