Skip to content

Commit 78097d9

Browse files
committed
initial attempt to add aarch64-unknown-linux-musl to dist-linux-arm
1 parent 4b65872 commit 78097d9

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile

+11-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ RUN sh /scripts/cross-apt-packages.sh
66
COPY scripts/crosstool-ng-1.24.sh /scripts/
77
RUN sh /scripts/crosstool-ng-1.24.sh
88

9+
WORKDIR /build
10+
11+
COPY scripts/musl-toolchain.sh /build/
12+
# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well
13+
RUN CFLAGS="-Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
14+
CXXFLAGS="-Wa,--compress-debug-sections=none -Wl,--compress-debug-sections=none" \
15+
bash musl-toolchain.sh aarch64 && rm -rf build
16+
917
COPY scripts/rustbuild-setup.sh /scripts/
1018
RUN sh /scripts/rustbuild-setup.sh
1119
USER rustbuild
@@ -25,7 +33,8 @@ ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \
2533
AR_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-ar \
2634
CXX_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-g++
2735

28-
ENV HOSTS=arm-unknown-linux-gnueabi
36+
ENV HOSTS=arm-unknown-linux-gnueabi,aarch64-unknown-linux-musl
2937

30-
ENV RUST_CONFIGURE_ARGS --enable-full-tools --disable-docs
38+
ENV RUST_CONFIGURE_ARGS --enable-full-tools --disable-docs --musl-root-aarch64=/usr/local/aarch64-linux-musl \
39+
--set target.aarch64-unknown-linux-musl.crt-static=false
3140
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/host-x86_64/dist-arm-linux/arm-linux-gnueabi.config

+2-15
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ CT_CONFIGURE_has_autoconf_2_65_or_newer=y
1414
CT_CONFIGURE_has_autoreconf_2_65_or_newer=y
1515
CT_CONFIGURE_has_automake_1_15_or_newer=y
1616
CT_CONFIGURE_has_gnu_m4_1_4_12_or_newer=y
17+
CT_CONFIGURE_has_python_3_4_or_newer=y
1718
CT_CONFIGURE_has_bison_2_7_or_newer=y
1819
CT_CONFIGURE_has_python=y
1920
CT_CONFIGURE_has_git=y
@@ -132,12 +133,6 @@ CT_ARCH_ARM=y
132133
# CT_ARCH_XTENSA is not set
133134
CT_ARCH="arm"
134135
CT_ARCH_CHOICE_KSYM="ARM"
135-
# CT_ARCH_ALPHA_EV4 is not set
136-
# CT_ARCH_ALPHA_EV45 is not set
137-
# CT_ARCH_ALPHA_EV5 is not set
138-
# CT_ARCH_ALPHA_EV56 is not set
139-
# CT_ARCH_ALPHA_EV6 is not set
140-
# CT_ARCH_ALPHA_EV67 is not set
141136
CT_ARCH_CPU=""
142137
CT_ARCH_TUNE=""
143138
CT_ARCH_ARM_SHOW=y
@@ -371,8 +366,6 @@ CT_ALL_BINUTILS_CHOICES="BINUTILS"
371366
# C-library
372367
#
373368
CT_LIBC_GLIBC=y
374-
# CT_LIBC_NEWLIB is not set
375-
# CT_LIBC_NONE is not set
376369
# CT_LIBC_UCLIBC is not set
377370
CT_LIBC="glibc"
378371
CT_LIBC_CHOICE_KSYM="GLIBC"
@@ -389,6 +382,7 @@ CT_GLIBC_USE="GLIBC"
389382
CT_GLIBC_PKG_NAME="glibc"
390383
CT_GLIBC_SRC_RELEASE=y
391384
CT_GLIBC_PATCH_ORDER="global"
385+
# CT_GLIBC_V_2_29 is not set
392386
# CT_GLIBC_V_2_28 is not set
393387
# CT_GLIBC_V_2_27 is not set
394388
# CT_GLIBC_V_2_26 is not set
@@ -407,7 +401,6 @@ CT_GLIBC_ARCHIVE_FORMATS=".tar.xz .tar.bz2 .tar.gz"
407401
CT_GLIBC_SIGNATURE_FORMAT="packed/.sig"
408402
CT_GLIBC_2_29_or_older=y
409403
CT_GLIBC_older_than_2_29=y
410-
CT_GLIBC_REQUIRE_older_than_2_29=y
411404
CT_GLIBC_2_27_or_older=y
412405
CT_GLIBC_older_than_2_27=y
413406
CT_GLIBC_2_26_or_older=y
@@ -447,12 +440,6 @@ CT_GLIBC_FORCE_UNWIND=y
447440
CT_GLIBC_KERNEL_VERSION_AS_HEADERS=y
448441
# CT_GLIBC_KERNEL_VERSION_CHOSEN is not set
449442
CT_GLIBC_MIN_KERNEL="3.2.101"
450-
# CT_GLIBC_SSP_DEFAULT is not set
451-
# CT_GLIBC_SSP_NO is not set
452-
# CT_GLIBC_SSP_YES is not set
453-
# CT_GLIBC_SSP_ALL is not set
454-
# CT_GLIBC_SSP_STRONG is not set
455-
# CT_NEWLIB_USE_REDHAT is not set
456443
CT_ALL_LIBC_CHOICES="AVR_LIBC BIONIC GLIBC MINGW_W64 MOXIEBOX MUSL NEWLIB NONE UCLIBC"
457444
CT_LIBC_SUPPORT_THREADS_ANY=y
458445
CT_LIBC_SUPPORT_THREADS_NATIVE=y

src/tools/build-manifest/src/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use std::process::{Command, Stdio};
1616

1717
static HOSTS: &[&str] = &[
1818
"aarch64-unknown-linux-gnu",
19+
"aarch64-unknown-linux-musl",
1920
"arm-unknown-linux-gnueabi",
2021
"arm-unknown-linux-gnueabihf",
2122
"armv7-unknown-linux-gnueabihf",

0 commit comments

Comments
 (0)