Skip to content

Fix x86_64 code being produced for bare-metal LoongArch targets' compiler_builtins #127150

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

Merged
merged 1 commit into from
Jul 1, 2024
Merged
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
20 changes: 19 additions & 1 deletion src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,30 @@ ENV CC_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-gcc \
AR_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-ar \
CXX_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-g++

# We re-use the Linux toolchain for bare-metal, because upstream bare-metal
# target support for LoongArch is only available from GCC 14+.
#
# See: https://github.com/gcc-mirror/gcc/commit/976f4f9e4770
ENV CC_loongarch64_unknown_none=loongarch64-unknown-linux-gnu-gcc \
AR_loongarch64_unknown_none=loongarch64-unknown-linux-gnu-ar \
CXX_loongarch64_unknown_none=loongarch64-unknown-linux-gnu-g++ \
CFLAGS_loongarch64_unknown_none="-ffreestanding -mabi=lp64d" \
CXXFLAGS_loongarch64_unknown_none="-ffreestanding -mabi=lp64d" \
CC_loongarch64_unknown_none_softfloat=loongarch64-unknown-linux-gnu-gcc \
AR_loongarch64_unknown_none_softfloat=loongarch64-unknown-linux-gnu-ar \
CXX_loongarch64_unknown_none_softfloat=loongarch64-unknown-linux-gnu-g++ \
CFLAGS_loongarch64_unknown_none_softfloat="-ffreestanding -mabi=lp64s -mfpu=none" \
CXXFLAGS_loongarch64_unknown_none_softfloat="-ffreestanding -mabi=lp64s -mfpu=none"

ENV HOSTS=loongarch64-unknown-linux-gnu
ENV TARGETS=$HOSTS
ENV TARGETS=$TARGETS,loongarch64-unknown-none
ENV TARGETS=$TARGETS,loongarch64-unknown-none-softfloat

ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-full-tools \
--enable-profiler \
--disable-docs

ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $TARGETS
2 changes: 0 additions & 2 deletions src/ci/docker/host-x86_64/dist-various-2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ ENV TARGETS=$TARGETS,armv7-unknown-linux-gnueabi
ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabi
ENV TARGETS=$TARGETS,i686-unknown-freebsd
ENV TARGETS=$TARGETS,x86_64-unknown-none
ENV TARGETS=$TARGETS,loongarch64-unknown-none
ENV TARGETS=$TARGETS,loongarch64-unknown-none-softfloat
ENV TARGETS=$TARGETS,aarch64-unknown-uefi
ENV TARGETS=$TARGETS,i686-unknown-uefi
ENV TARGETS=$TARGETS,x86_64-unknown-uefi
Expand Down
Loading