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,
|
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()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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),
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue