diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 1 | ||||
| -rw-r--r-- | src/bootstrap/native.rs | 2 | ||||
| -rw-r--r-- | src/ci/docker/host-x86_64/disabled/dist-m68k-linux/Dockerfile | 26 | ||||
| -rw-r--r-- | src/doc/rustc/src/platform-support.md | 1 | ||||
| -rw-r--r-- | src/doc/rustc/src/platform-support/m68k-unknown-linux-gnu.md | 97 | ||||
| -rw-r--r-- | src/librustdoc/clean/cfg.rs | 1 | ||||
| -rw-r--r-- | src/tools/build-manifest/src/main.rs | 1 | ||||
| -rw-r--r-- | src/tools/compiletest/src/util.rs | 1 |
8 files changed, 129 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 1f1eca1c76c..57ade88f733 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -277,6 +277,7 @@ def default_build_triple(verbose): 'i486': 'i686', 'i686': 'i686', 'i786': 'i686', + 'm68k': 'm68k', 'powerpc': 'powerpc', 'powerpc64': 'powerpc64', 'powerpc64le': 'powerpc64le', diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 0e306cb7211..27c9bb2504f 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -165,7 +165,7 @@ impl Step for Llvm { let llvm_exp_targets = match builder.config.llvm_experimental_targets { Some(ref s) => s, - None => "AVR", + None => "AVR;M68k", }; let assertions = if builder.config.llvm_assertions { "ON" } else { "OFF" }; diff --git a/src/ci/docker/host-x86_64/disabled/dist-m68k-linux/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-m68k-linux/Dockerfile new file mode 100644 index 00000000000..17203994cdf --- /dev/null +++ b/src/ci/docker/host-x86_64/disabled/dist-m68k-linux/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:20.04 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + g++ \ + make \ + file \ + curl \ + ca-certificates \ + python2.7 \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils \ + g++-m68k-linux-gnu \ + libssl-dev \ + pkg-config + + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +ENV HOSTS=m68k-unknown-linux-gnu + +ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended +ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 3ba06e87220..0f106292e96 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -238,6 +238,7 @@ target | std | host | notes `i686-uwp-windows-gnu` | ? | | `i686-uwp-windows-msvc` | ? | | `i686-wrs-vxworks` | ? | | +`m68k-unknown-linux-gnu` | ? | | Motorola 680x0 Linux `mips-unknown-linux-uclibc` | ✓ | | MIPS Linux with uClibc `mipsel-sony-psp` | * | | MIPS (LE) Sony PlayStation Portable (PSP) `mipsel-unknown-linux-uclibc` | ✓ | | MIPS (LE) Linux with uClibc diff --git a/src/doc/rustc/src/platform-support/m68k-unknown-linux-gnu.md b/src/doc/rustc/src/platform-support/m68k-unknown-linux-gnu.md new file mode 100644 index 00000000000..d325ba3346a --- /dev/null +++ b/src/doc/rustc/src/platform-support/m68k-unknown-linux-gnu.md @@ -0,0 +1,97 @@ +# m68k-unknown-linux-gnu + +**Tier: 3** + +Motorola 680x0 Linux + +## Designated Developers + +* [@glaubitz](https://github.com/glaubitz) +* [@ricky26](https://github.com/ricky26) + +## Requirements + +This target requires a Linux/m68k build environment for cross-compilation which +is available on Debian and Debian-based systems, openSUSE and other distributions. + +On Debian, 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 +``` + +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 + +The codegen for this target should be built by default. However, core and std +are currently missing but are being worked on and should become available in +the near future. + +## 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 + +Rust programs can be built for that target: + +```text +rustc --target m68k-unknown-linux-gnu your-code.rs +``` + +Very simple progams can be run using the `qemu-m68k-static` program: + +```text +$ qemu-m68k-static your-code +``` + +For more complex applications, a chroot or native (emulated) Debian/m68k system are required +for testing. diff --git a/src/librustdoc/clean/cfg.rs b/src/librustdoc/clean/cfg.rs index 592aefb6a4b..9b5ca068486 100644 --- a/src/librustdoc/clean/cfg.rs +++ b/src/librustdoc/clean/cfg.rs @@ -491,6 +491,7 @@ impl<'a> fmt::Display for Display<'a> { "aarch64" => "AArch64", "arm" => "ARM", "asmjs" => "JavaScript", + "m68k" => "M68k", "mips" => "MIPS", "mips64" => "MIPS-64", "msp430" => "MSP430", diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index ab63a9e2dfa..c1579ae9ac5 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -99,6 +99,7 @@ static TARGETS: &[&str] = &[ "i686-unknown-freebsd", "i686-unknown-linux-gnu", "i686-unknown-linux-musl", + "m68k-unknown-linux-gnu", "mips-unknown-linux-gnu", "mips-unknown-linux-musl", "mips64-unknown-linux-gnuabi64", diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs index 37164c4e575..75d392951ec 100644 --- a/src/tools/compiletest/src/util.rs +++ b/src/tools/compiletest/src/util.rs @@ -54,6 +54,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[ ("i386", "x86"), ("i586", "x86"), ("i686", "x86"), + ("m68k", "m68k"), ("mips", "mips"), ("mips64", "mips64"), ("mips64el", "mips64"), |
