Skip to content

Commit

Permalink
Fix linking of tool on Linux AArch64
Browse files Browse the repository at this point in the history
I specified the linker to `aarch64-none-elf-ld` because I would've
thought that even though we are targeting Linux, the linker shouldn't
matter but on Linux AArch64 we get a segfault when running the Microkit
tool.

Changing the linker to `aarch64-linux-gnu-ld` fixes that.

I'm not really happy with this solution as we now have to install a new
C toolchain just to compile a Rust program, from searching on the
internet the solution seems to be to use the cross-rs package, which
just uses Docker containers so isn't actually cross compiling anything.

If anyone has any better ideas please let me know.

Signed-off-by: Ivan Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Oct 2, 2024
1 parent 361ccd1 commit 7e72f0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:
texlive-fonts-recommended texlive-fonts-extra \
libxml2-utils \
python3.9 python3-pip python3.9-venv \
qemu-system-arm qemu-system-misc
qemu-system-arm qemu-system-misc \
gcc-aarch64-linux-gnu
python3.9 -m venv pyenv
./pyenv/bin/pip install --upgrade pip setuptools wheel
./pyenv/bin/pip install -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion tool/microkit/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# SPDX-License-Identifier: BSD-2-Clause

[target.aarch64-unknown-linux-musl]
linker = "aarch64-none-elf-ld"
linker = "aarch64-linux-gnu-ld"

0 comments on commit 7e72f0b

Please sign in to comment.