summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorAndre Richter <andre.o.richter@gmail.com>2020-02-28 19:05:42 +0100
committerAndre Richter <andre.o.richter@gmail.com>2020-02-28 19:05:42 +0100
commit176bf3c60f529a9eb4ed04b5e59deee02c26dcee (patch)
tree1f6185de2faf37a88dbb4ab1968009a67e27de19 /src/ci/docker
parenta8437cf213ac1e950b6f5c691c4d2a29bf949bcd (diff)
downloadrust-176bf3c60f529a9eb4ed04b5e59deee02c26dcee.tar.gz
rust-176bf3c60f529a9eb4ed04b5e59deee02c26dcee.zip
AArch64 bare-metal targets: Build rust-std
This patch enables building of rust-std for the aarch64 bare-metal targets.

For the compiler intrinsics, it fetches the AArch64 bare-metal target
(aarch64-none-elf) GCC for the A-profile provided by ARM itself from
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
Diffstat (limited to 'src/ci/docker')
-rw-r--r--src/ci/docker/dist-various-1/Dockerfile9
-rwxr-xr-xsrc/ci/docker/dist-various-1/install-aarch64-none-elf.sh6
2 files changed, 15 insertions, 0 deletions
diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile
index 2a68a25be21..4ac5e23d683 100644
--- a/src/ci/docker/dist-various-1/Dockerfile
+++ b/src/ci/docker/dist-various-1/Dockerfile
@@ -72,6 +72,9 @@ RUN ./install-mips-musl.sh
 COPY dist-various-1/install-mipsel-musl.sh /build
 RUN ./install-mipsel-musl.sh
 
+COPY dist-various-1/install-aarch64-none-elf.sh /build
+RUN ./install-aarch64-none-elf.sh
+
 # Suppress some warnings in the openwrt toolchains we downloaded
 ENV STAGING_DIR=/tmp
 
@@ -140,6 +143,8 @@ ENV TARGETS=$TARGETS,armv5te-unknown-linux-gnueabi
 ENV TARGETS=$TARGETS,armv5te-unknown-linux-musleabi
 ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
 ENV TARGETS=$TARGETS,aarch64-unknown-linux-musl
+ENV TARGETS=$TARGETS,aarch64-unknown-none
+ENV TARGETS=$TARGETS,aarch64-unknown-none-softfloat
 ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
 ENV TARGETS=$TARGETS,x86_64-unknown-redox
 ENV TARGETS=$TARGETS,thumbv6m-none-eabi
@@ -178,6 +183,10 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
     CC_armv7a_none_eabihf=arm-none-eabi-gcc \
     CFLAGS_armv7a_none_eabi=-march=armv7-a \
     CFLAGS_armv7a_none_eabihf=-march=armv7-a+vfpv3 \
+    CC_aarch64_unknown_none_softfloat=aarch64-none-elf-gcc \
+    CFLAGS_aarch64_unknown_none_softfloat=-mstrict-align -march=armv8-a+nofp+nosimd \
+    CC_aarch64_unknown_none=aarch64-none-elf-gcc \
+    CFLAGS_aarch64_unknown_none=-mstrict-align -march=armv8-a+fp+simd \
     CC_riscv64gc_unknown_linux_gnu=riscv64-unknown-linux-gnu-gcc \
     AR_riscv64gc_unknown_linux_gnu=riscv64-unknown-linux-gnu-ar \
     CXX_riscv64gc_unknown_linux_gnu=riscv64-unknown-linux-gnu-g++ \
diff --git a/src/ci/docker/dist-various-1/install-aarch64-none-elf.sh b/src/ci/docker/dist-various-1/install-aarch64-none-elf.sh
new file mode 100755
index 00000000000..d72976c2858
--- /dev/null
+++ b/src/ci/docker/dist-various-1/install-aarch64-none-elf.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -ex
+
+curl -L https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf.tar.xz \
+| tar --extract --xz --strip 1 --directory /usr/local