Skip to content

Add armv7-unknown-linux-musleabihf host tools to CI #142538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions src/ci/docker/host-x86_64/dist-armv7-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:22.04

COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

COPY scripts/crosstool-ng.sh /scripts/
RUN sh /scripts/crosstool-ng.sh

COPY scripts/rustbuild-setup.sh /scripts/
RUN sh /scripts/rustbuild-setup.sh
WORKDIR /tmp

COPY scripts/crosstool-ng-build.sh /scripts/
COPY host-x86_64/dist-armv7-linux-musl/armv7-unknown-linux-musleabihf.defconfig /tmp/crosstool.defconfig
RUN /scripts/crosstool-ng-build.sh

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV PATH=$PATH:/x-tools/armv7-unknown-linux-musleabihf/bin

ENV CC_armv7_unknown_linux_musleabihf=armv7-unknown-linux-musleabihf-gcc \
AR_armv7_unknown_linux_musleabihf=armv7-unknown-linux-musleabihf-ar \
CXX_armv7_unknown_linux_musleabihf=armv7-unknown-linux-musleabihf-g++

ENV HOSTS=armv7-unknown-linux-musleabihf

ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-full-tools \
--enable-profiler \
--enable-sanitizers \
--disable-docs \
--set target.armv7-unknown-linux-musleabihf.crt-static=false \
--musl-root-armv7hf=/x-tools/armv7-unknown-linux-musleabihf/armv7-unknown-linux-musleabihf/sysroot/usr

ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CT_CONFIG_VERSION="4"
CT_EXPERIMENTAL=y
CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
CT_USE_MIRROR=y
CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc"
CT_ARCH_ARM=y
CT_ARCH_ARM_MODE_THUMB=y
CT_ARCH_SUFFIX="v7"
CT_ARCH_ARCH="armv7-a"
CT_ARCH_FPU="vfpv3-d16"
CT_ARCH_FLOAT_HW=y
CT_KERNEL_LINUX=y
CT_LINUX_V_4_19=y
CT_LIBC_MUSL=y
CT_MUSL_V_1_2_3=y
CT_CC_LANG_CXX=y
CT_GETTEXT_NEEDED=y
12 changes: 4 additions & 8 deletions src/ci/docker/host-x86_64/dist-various-1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ RUN env \
env \
CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv6 -marm -mfpu=vfp" \
CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv6 -marm -mfpu=vfp" \
bash musl.sh armhf && \
env \
CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a+fp" \
CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv7-a+fp" \
bash musl.sh armv7hf
bash musl.sh armhf

ENV RUN_MAKE_TARGETS=thumbv6m-none-eabi
ENV RUN_MAKE_TARGETS=$RUN_MAKE_TARGETS,thumbv7m-none-eabi
Expand All @@ -89,7 +85,7 @@ ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
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-none
ENV TARGETS=$TARGETS,aarch64-unknown-none-softfloat
ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
Expand Down Expand Up @@ -121,7 +117,7 @@ ENV TARGETS=$TARGETS,x86_64-pc-windows-gnullvm
ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft" \
CFLAGS_arm_unknown_linux_musleabi="-march=armv6 -marm" \
CFLAGS_arm_unknown_linux_musleabihf="-march=armv6 -marm -mfpu=vfp" \
CFLAGS_armv7_unknown_linux_musleabihf="-march=armv7-a+fp" \

CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \
CC_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
Expand Down Expand Up @@ -157,7 +153,7 @@ ENV RUST_CONFIGURE_ARGS \
--musl-root-armv5te=/musl-armv5te \
--musl-root-arm=/musl-arm \
--musl-root-armhf=/musl-armhf \
--musl-root-armv7hf=/musl-armv7hf \

--disable-docs

ENV SCRIPT \
Expand Down
3 changes: 3 additions & 0 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ auto:
- name: dist-armv7-linux
<<: *job-linux-4c

- name: dist-armv7-linux-musl
<<: *job-linux-4c

- name: dist-i586-gnu-i586-i686-musl
<<: *job-linux-4c

Expand Down
Loading