Skip to content

Commit 139ca10

Browse files
Apply suggestions from workingjubilee's code review
Co-authored-by: Jubilee <[email protected]>
1 parent 2287491 commit 139ca10

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

Diff for: compiler/rustc_target/src/spec/targets/m68k_unknown_none_elf.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ pub(crate) fn target() -> Target {
1111
panic_strategy: PanicStrategy::Abort,
1212
code_model: Some(CodeModel::Medium),
1313
has_rpath: false,
14+
// should be soft-float
15+
llvm_floatabi: None,
1416
..Default::default()
1517
};
1618

Diff for: src/doc/rustc/src/platform-support/m68k-unknown-none-elf.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Tier: 3**
44

5-
Motorola 680x0 Linux
5+
Bare metal Motorola 680x0
66

77
## Designated Developers
88

@@ -12,15 +12,15 @@ Motorola 680x0 Linux
1212

1313
## Requirements
1414

15-
This target requires am m68k build environment for cross-compilation which
16-
is available on Debian and Debian-based systems, openSUSE and other distributions.
15+
This target requires an m68k build environment for cross-compilation which
16+
is available on Debian, Debian-based systems, openSUSE, and other distributions.
1717

18-
On Debian, it should be sufficient to install a g++ cross-compiler for the m68k
18+
On Debian-based systems, it should be sufficient to install a g++ cross-compiler for the m68k
1919
architecture which will automatically pull in additional dependencies such as
2020
the glibc cross development package:
2121

22-
```text
23-
# apt install g++-m68k-linux-gnu
22+
```sh
23+
apt install g++-m68k-linux-gnu
2424
```
2525

2626
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.
8383
Recommended `.cargo/config.toml`:
8484
```toml
8585
[unstable]
86-
build-std = ["panic_abort","core", "alloc"]
86+
build-std = ["panic_abort", "core", "alloc"]
8787

8888
[target.m68k-unknown-none-elf]
89-
# there is no easily available non-linux m68k linker, so just use the linux one
89+
# as we're building for ELF, the m68k-linux linker should be adequate
9090
linker = "m68k-linux-gnu-ld"
9191

9292
# the mold linker also supports m68k, remove the above line and uncomment the
@@ -97,14 +97,14 @@ linker = "m68k-linux-gnu-ld"
9797

9898
Rust programs can be built for this target using:
9999

100-
```text
100+
```sh
101101
cargo build --target m68k-unknown-none-elf
102102
```
103103

104104
Very simple programs can be run using the `qemu-m68k-static` program:
105105

106-
```text
107-
$ qemu-m68k-static your-code
106+
```sh
107+
qemu-m68k-static your-code
108108
```
109109

110110
For more complex applications, a chroot or native m68k system is required for testing.

Diff for: src/tools/compiletest/src/header/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,6 @@ fn is_big_endian() {
617617
("x86_64-unknown-linux-gnu", false),
618618
("bpfeb-unknown-none", true),
619619
("m68k-unknown-linux-gnu", true),
620-
("m68k-unknown-none-elf", true),
621620
("aarch64_be-unknown-linux-gnu", true),
622621
("powerpc64-unknown-linux-gnu", true),
623622
];

0 commit comments

Comments
 (0)