Skip to content

Commit

Permalink
initial attempt to add aarch64-unknown-linux-musl to dist-linux-arm
Browse files Browse the repository at this point in the history
  • Loading branch information
Gelbpunkt committed Sep 6, 2020
1 parent 4b65872 commit 78097d9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
13 changes: 11 additions & 2 deletions src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile
Expand Up @@ -6,6 +6,14 @@ RUN sh /scripts/cross-apt-packages.sh
COPY scripts/crosstool-ng-1.24.sh /scripts/
RUN sh /scripts/crosstool-ng-1.24.sh

WORKDIR /build

COPY scripts/musl-toolchain.sh /build/
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
RUN CFLAGS="-Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
CXXFLAGS="-Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
bash musl-toolchain.sh aarch64 && rm -rf build

COPY scripts/rustbuild-setup.sh /scripts/
RUN sh /scripts/rustbuild-setup.sh
USER rustbuild
Expand All @@ -25,7 +33,8 @@ ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \
AR_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-ar \
CXX_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-g++

ENV HOSTS=arm-unknown-linux-gnueabi
ENV HOSTS=arm-unknown-linux-gnueabi,aarch64-unknown-linux-musl

ENV RUST_CONFIGURE_ARGS --enable-full-tools --disable-docs
ENV RUST_CONFIGURE_ARGS --enable-full-tools --disable-docs --musl-root-aarch64=/usr/local/aarch64-linux-musl \
--set target.aarch64-unknown-linux-musl.crt-static=false
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
17 changes: 2 additions & 15 deletions src/ci/docker/host-x86_64/dist-arm-linux/arm-linux-gnueabi.config
Expand Up @@ -14,6 +14,7 @@ CT_CONFIGURE_has_autoconf_2_65_or_newer=y
CT_CONFIGURE_has_autoreconf_2_65_or_newer=y
CT_CONFIGURE_has_automake_1_15_or_newer=y
CT_CONFIGURE_has_gnu_m4_1_4_12_or_newer=y
CT_CONFIGURE_has_python_3_4_or_newer=y
CT_CONFIGURE_has_bison_2_7_or_newer=y
CT_CONFIGURE_has_python=y
CT_CONFIGURE_has_git=y
Expand Down Expand Up @@ -132,12 +133,6 @@ CT_ARCH_ARM=y
# CT_ARCH_XTENSA is not set
CT_ARCH="arm"
CT_ARCH_CHOICE_KSYM="ARM"
# CT_ARCH_ALPHA_EV4 is not set
# CT_ARCH_ALPHA_EV45 is not set
# CT_ARCH_ALPHA_EV5 is not set
# CT_ARCH_ALPHA_EV56 is not set
# CT_ARCH_ALPHA_EV6 is not set
# CT_ARCH_ALPHA_EV67 is not set
CT_ARCH_CPU=""
CT_ARCH_TUNE=""
CT_ARCH_ARM_SHOW=y
Expand Down Expand Up @@ -371,8 +366,6 @@ CT_ALL_BINUTILS_CHOICES="BINUTILS"
# C-library
#
CT_LIBC_GLIBC=y
# CT_LIBC_NEWLIB is not set
# CT_LIBC_NONE is not set
# CT_LIBC_UCLIBC is not set
CT_LIBC="glibc"
CT_LIBC_CHOICE_KSYM="GLIBC"
Expand All @@ -389,6 +382,7 @@ CT_GLIBC_USE="GLIBC"
CT_GLIBC_PKG_NAME="glibc"
CT_GLIBC_SRC_RELEASE=y
CT_GLIBC_PATCH_ORDER="global"
# CT_GLIBC_V_2_29 is not set
# CT_GLIBC_V_2_28 is not set
# CT_GLIBC_V_2_27 is not set
# CT_GLIBC_V_2_26 is not set
Expand All @@ -407,7 +401,6 @@ CT_GLIBC_ARCHIVE_FORMATS=".tar.xz .tar.bz2 .tar.gz"
CT_GLIBC_SIGNATURE_FORMAT="packed/.sig"
CT_GLIBC_2_29_or_older=y
CT_GLIBC_older_than_2_29=y
CT_GLIBC_REQUIRE_older_than_2_29=y
CT_GLIBC_2_27_or_older=y
CT_GLIBC_older_than_2_27=y
CT_GLIBC_2_26_or_older=y
Expand Down Expand Up @@ -447,12 +440,6 @@ CT_GLIBC_FORCE_UNWIND=y
CT_GLIBC_KERNEL_VERSION_AS_HEADERS=y
# CT_GLIBC_KERNEL_VERSION_CHOSEN is not set
CT_GLIBC_MIN_KERNEL="3.2.101"
# CT_GLIBC_SSP_DEFAULT is not set
# CT_GLIBC_SSP_NO is not set
# CT_GLIBC_SSP_YES is not set
# CT_GLIBC_SSP_ALL is not set
# CT_GLIBC_SSP_STRONG is not set
# CT_NEWLIB_USE_REDHAT is not set
CT_ALL_LIBC_CHOICES="AVR_LIBC BIONIC GLIBC MINGW_W64 MOXIEBOX MUSL NEWLIB NONE UCLIBC"
CT_LIBC_SUPPORT_THREADS_ANY=y
CT_LIBC_SUPPORT_THREADS_NATIVE=y
Expand Down
1 change: 1 addition & 0 deletions src/tools/build-manifest/src/main.rs
Expand Up @@ -16,6 +16,7 @@ use std::process::{Command, Stdio};

static HOSTS: &[&str] = &[
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"arm-unknown-linux-gnueabi",
"arm-unknown-linux-gnueabihf",
"armv7-unknown-linux-gnueabihf",
Expand Down

0 comments on commit 78097d9

Please sign in to comment.