Skip to content

add aarch64 Linux cross-compilation support#528

Open
sdv-infy wants to merge 1 commit into
eclipse-score:mainfrom
sdv-infy:aarch64-cross-compilation
Open

add aarch64 Linux cross-compilation support#528
sdv-infy wants to merge 1 commit into
eclipse-score:mainfrom
sdv-infy:aarch64-cross-compilation

Conversation

@sdv-infy

Copy link
Copy Markdown

Summary

Adds --config=linux_aarch64 build configuration for cross-compiling to AArch64 Linux
using the hermetic GCC 15.2 toolchain and Ferrocene Rust toolchain.

Changes

  • .bazelrc: Added linux_aarch64 config block (platform, toolchains, -mno-outline-atomics)
  • MODULE.bazel: Added gcc_toolchain_aarch64 (GCC 15.2) and ferrocene_aarch64_unknown_linux_gnu_llvm Rust toolchain

Testing

  • Successfully builds //score/mw/com:types, //score/message_passing:message_passing_unix_domain, and test binaries for aarch64
  • Cross-compiled test binary verified running under QEMU aarch64 user-mode emulation (unit tests pass)

Comment thread .bazelrc
common:linux_aarch64_score_gcc_12_2_0_posix --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_linux_gnu

common:linux_aarch64 --extra_toolchains=@gcc_toolchain_aarch64//:cc_toolchain
common:linux_aarch64 --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we add this toolchain here also?

Comment thread .bazelrc
common:linux_aarch64 --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux
common:linux_aarch64 --extra_toolchains=@ferrocene_aarch64_unknown_linux_gnu_llvm//:rust_ferrocene_toolchain
common:linux_aarch64 --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix
build:linux_aarch64 --copt=-mno-outline-atomics

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have copt only in the MODULE file

Comment thread .bazelrc
common:linux_aarch64 --extra_toolchains=@gcc_toolchain_aarch64//:cc_toolchain
common:linux_aarch64 --extra_toolchains=@score_gcc_aarch64_toolchain//:aarch64-linux
common:linux_aarch64 --extra_toolchains=@ferrocene_aarch64_unknown_linux_gnu_llvm//:rust_ferrocene_toolchain
common:linux_aarch64 --platforms=@score_bazel_platforms//:aarch64-linux-gcc_12.2.0-posix

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong, as the first toolchain is a gcc15?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants