-
Notifications
You must be signed in to change notification settings - Fork 425
Add aarch64_be-unknown-linux-gnu target #1707
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
neuschaefer
wants to merge
1
commit into
cross-rs:main
Choose a base branch
from
neuschaefer:a64be-gnu
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM ubuntu:24.04 AS cross-base | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
COPY common.sh lib.sh / | ||
RUN /common.sh | ||
|
||
COPY cmake.sh / | ||
RUN /cmake.sh | ||
|
||
FROM cross-base AS build | ||
|
||
ARG VERBOSE | ||
COPY crosstool-ng.sh / | ||
COPY crosstool-config/aarch64_be-unknown-linux-gnu.config / | ||
RUN /crosstool-ng.sh aarch64_be-unknown-linux-gnu.config 5 | ||
|
||
ENV PATH=/x-tools/aarch64_be-unknown-linux-gnu/bin/:$PATH | ||
|
||
COPY qemu.sh / | ||
RUN /qemu.sh aarch64_be | ||
|
||
COPY qemu-runner base-runner.sh / | ||
COPY toolchain.cmake /opt/toolchain.cmake | ||
|
||
ENV CROSS_TOOLCHAIN_PREFIX=aarch64_be-unknown-linux-gnu- | ||
ENV CROSS_SYSROOT=/x-tools/aarch64_be-unknown-linux-gnu/aarch64_be-unknown-linux-gnu/sysroot/ | ||
ENV CROSS_TARGET_RUNNER="/qemu-runner aarch64_be" | ||
ENV CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_LINKER="$CROSS_TOOLCHAIN_PREFIX"gcc \ | ||
CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_RUNNER="$CROSS_TARGET_RUNNER" \ | ||
AR_aarch64_be_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"ar \ | ||
CC_aarch64_be_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"gcc \ | ||
CXX_aarch64_be_unknown_linux_gnu="$CROSS_TOOLCHAIN_PREFIX"g++ \ | ||
CMAKE_TOOLCHAIN_FILE_aarch64_be_unknown_linux_gnu=/opt/toolchain.cmake \ | ||
BINDGEN_EXTRA_CLANG_ARGS_aarch64_be_unknown_linux_gnu="--sysroot=$CROSS_SYSROOT -idirafter/usr/include" \ | ||
QEMU_LD_PREFIX="$CROSS_SYSROOT" \ | ||
RUST_TEST_THREADS=1 \ | ||
CROSS_CMAKE_SYSTEM_NAME=Linux \ | ||
CROSS_CMAKE_SYSTEM_PROCESSOR=aarch64_be \ | ||
CROSS_CMAKE_CRT=gnu \ | ||
CROSS_CMAKE_OBJECT_FLAGS="-ffunction-sections -fdata-sections -fPIC" | ||
|
||
RUN sed -e "s#@DEFAULT_QEMU_LD_PREFIX@#$QEMU_LD_PREFIX#g" -i /qemu-runner |
38 changes: 38 additions & 0 deletions
38
docker/crosstool-config/aarch64_be-unknown-linux-gnu.config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CT_CONFIG_VERSION="4" | ||
CT_PREFIX_DIR="/x-tools/${CT_TARGET}" | ||
CT_DOWNLOAD_AGENT_CURL=y | ||
CT_ARCH_ARM=y | ||
CT_ARCH_64=y | ||
CT_ARCH_BE=y | ||
CT_ARCH_FLOAT_HW=y | ||
CT_KERNEL_LINUX=y | ||
CT_LINUX_V_5_19=y | ||
# CT_LINUX_NO_VERSIONS is not set | ||
CT_LINUX_VERSION="5.19.16" | ||
CT_LINUX_later_than_4_8=y | ||
CT_LINUX_4_8_or_later=y | ||
CT_LINUX_later_than_3_7=y | ||
CT_LINUX_3_7_or_later=y | ||
CT_LINUX_later_than_3_2=y | ||
CT_LINUX_3_2_or_later=y | ||
CT_GLIBC_V_2_36=y | ||
# CT_GLIBC_NO_VERSIONS is not set | ||
CT_GLIBC_VERSION="2.36" | ||
CT_GLIBC_2_17_or_later=y | ||
CT_GLIBC_later_than_2_14=y | ||
CT_GLIBC_2_14_or_later=y | ||
CT_GCC_V_14=y | ||
# CT_GCC_NO_VERSIONS is not set | ||
CT_GCC_VERSION="14.2.0" | ||
CT_GCC_later_than_7=y | ||
CT_GCC_7_or_later=y | ||
CT_GCC_later_than_6=y | ||
CT_GCC_6_or_later=y | ||
CT_GCC_later_than_5=y | ||
CT_GCC_5_or_later=y | ||
CT_GCC_later_than_4_9=y | ||
CT_GCC_4_9_or_later=y | ||
CT_GCC_later_than_4_8=y | ||
CT_GCC_4_8_or_later=y | ||
CT_CC_LANG_CXX=y | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.