🌐
GitHub
github.com › orgs › cross-rs › packages › container › package › aarch64-unknown-linux-gnu
Package aarch64-unknown-linux-gnu · GitHub
$ docker pull ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge@sha256:ac4f09bc4c06c272f3d61b62cd04229c3758a7c4336f94fd90a3a2d8b95a6682
🌐
Rust Documentation
doc.rust-lang.org › beta › rustc › platform-support › aarch64-unknown-linux-gnu.html
aarch64-unknown-linux-gnu - The rustc book
[target.aarch64-unknown-linux-gnu] cc = "aarch64-linux-gnu-gcc" cxx = "aarch64-linux-gnu-g++" ar = "aarch64-linux-gnu-ar" linker = "aarch64-linux-gnu-gcc"
Discussions

crossdev --target aarch64-unknown-linux-gnu is giving an error for emerging cross-glibc
You didn't read the last lines from your second paste? The lines after "if you need support...". More on reddit.com
🌐 r/Gentoo
21
2
January 26, 2025
Need help cross compiling to aarch64-unknown-linux-gnu
TLDR; I'm cross compiling my Rust lib to aarch64-unknown-linux-gnu and getting many errors like: CMake Error in src/transaction/CMakeLists.txt: Target "..." requires the language dialect "CXX20" (with compiler extensions). But the current compiler "GNU" does not support this, or CMake does ... More on users.rust-lang.org
🌐 users.rust-lang.org
2
0
January 2, 2025
cross-compiling to aarch64-unknown-linux-gnu uses wrong linker
Hi, request for help. In my release the build-local-artifacts step fails for two arm arch builds I have, when building ring, thus: Compiling ring v0.17.8 Compiling parking v2.2.0 The following warn... More on github.com
🌐 github.com
15
August 28, 2024
[Solved] Cross compile to aarch64 from windows10
I am trying to compile from windows10 machine(MINGW64_NT-10.0) a simple hello world and try to run it in a aarch64 system(and hopefully other devices too like omega 2+). it works obviously in cargo run but when I try cargo build --target aarch64-unknown-linux-gnu it doesn't work.. here is the ... More on users.rust-lang.org
🌐 users.rust-lang.org
9
0
November 29, 2018
🌐
Stack Overflow
stackoverflow.com › questions › 78845548 › rust-cross-compile-aarch64-unknown-linux-gnu-linker-error
gcc - Rust cross compile aarch64-unknown-linux-gnu linker error - Stack Overflow
FROM rust:bookworm RUN rustup toolchain install stable RUN rustup default stable RUN apt-get update && apt-get install -y multistrap curl gcc-aarch64-linux-gnu libgtk-4-dev debian-archive-keyring libglib2.0-dev libc6-dev-arm64-cross RUN rustup target add aarch64-unknown-linux-gnu COPY multistrap.conf / RUN multistrap -f multistrap.conf -d /usr/aarch64-linux-gnu ENV RUSTC_LOG="rustc_codegen_ssa::back::link=info" ENV RUSTFLAGS="-C link-arg=--sysroot=/usr/aarch64-linux-gnu -C link-arg=-Wl,--verbose" ENV PKG_CONFIG_SYSROOT_DIR="/usr/aarch64-linux-gnu" ENV PKG_CONFIG_LIBDIR=/usr/aarch64-linux-gnu/u
🌐
Reddit
reddit.com › r/gentoo › crossdev --target aarch64-unknown-linux-gnu is giving an error for emerging cross-glibc
crossdev --target aarch64-unknown-linux-gnu is giving an ...
January 26, 2025 -

I tried to set up a crossdev for a Raspbery Pi 4 on a desktop machine I had. It worked (sort of) but I had to make a bunch of changes to where now today when I tried to update cross-glibc failed. So I tried to just reset back to a stage3 tarball and redo it but it is still failing.

/var/log/portage/cross-aarch64-unknown-linux-gnu-info.log:

https://0x0.st/8XgU.log

/var/log/portage/cross-aarch64-unknown-linux-gnu-glibc.log:

https://0x0.st/8XgD.log

It compiles that I'm trying to compile glibc without optimisations but I have

cat /usr/aarch64-unknown-linux-gnu/etc/portage/make.conf |grep FLAGS
CFLAGS="-mcpu=cortex-a72 -O2 -pipe"
CXXFLAGS="${CFLAGS}"

I tried searching on bugs.gentoo.org but I couldn't find anything. Not sure where the problem is. Any suggestions?

Edit:

emerge -pqv '=cross-aarch64-unknown-linux-gnu/glibc-2.40-r8::crossdev'
[ebuild  N    ] cross-aarch64-unknown-linux-gnu/glibc-2.40-r8  USE="caps gd multiarch perl ssp static-libs systemd -audit (-cet) -compile-locales -custom-cflags -doc -hash-sysv-compat -headers-only (-multilib) -multilib-bootstrap -nscd -profile (-selinux) -stack-realign -suid -systemtap -test -vanilla" 
🌐
Rust Programming Language
users.rust-lang.org › help
Need help cross compiling to aarch64-unknown-linux-gnu - help - The Rust Programming Language Forum
January 2, 2025 - TLDR; I'm cross compiling my Rust lib to aarch64-unknown-linux-gnu and getting many errors like: CMake Error in src/transaction/CMakeLists.txt: Target "..." requires the language dialect "CXX20" (with compiler extensions). But the current compiler "GNU" does not support this, or CMake does not know the flags to enable it.
🌐
Arm Developer
developer.arm.com › downloads › - › arm-gnu-toolchain-downloads
Arm GNU Toolchain Downloads – Arm Developer
For Linux, the binaries are provided as tarball files. For macOS, the binaries are provided as tarball files and pkg files. The sources for this release are provided in the source tar ball, arm-gnu-toolchain-src-snapshot-14.2.rel1.tar.xz, and includes the following items: ... $ md5sum --check arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz.asc arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz: OK
🌐
GitHub
github.com › axodotdev › cargo-dist › issues › 1378
cross-compiling to aarch64-unknown-linux-gnu uses wrong linker · Issue #1378 · axodotdev/cargo-dist
August 28, 2024 - Compiling ring v0.17.8 Compiling parking v2.2.0 The following warnings were emitted during compilation: warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `arm-linux-gnueabihf-gcc` installed? warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool.
Author   andrewdavidmackenzie
🌐
Arch Linux
archlinux.org › packages › extra › x86_64 › rust-aarch64-gnu › files
Arch Linux - rust-aarch64-gnu 1:1.95.0-1 (x86_64) - File List
usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler2-c177f6e0e4406197.rmeta · usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-98145ac58773d127.rlib · usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-98145ac58773d127.rmeta · usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-25f3e8dfd1d106bb.rlib ·
🌐
Google Groups
groups.google.com › g › tock-dev › c › 7TTX1GEKWrk
TOOLCHAIN for target aarch64-unknown-linux-gnu
= note: "aarch64-linux-gnu-gcc" "-flavor" "gnu" "-L" "/home/shawnpeng/.rustup/toolchains/nightly-2018-06-26-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "/home/shawnpeng/tock/0724/tock/boards/hikey/target/aarch64-unknown-linux-gnu/release/deps/hikey-fb876f21c2527240.hikey0.rcgu.o" "-o" "/home/shawnpeng/tock/0724/tock/boards/hikey/target/aarch64-unknown-linux-gnu/release/deps/hikey-fb876f21c2527240" "--gc-sections" "-no-pie" "-z,relro,-z,now" "-L" "/home/shawnpeng/tock/0724/tock/boards/hikey/target/aarch64-unknown-linux-gnu/release/deps" "-L" "/home/shawnpeng/tock/0724/to
Find elsewhere
🌐
GitHub
github.com › crosstool-ng › crosstool-ng › tree › master › samples › aarch64-unknown-linux-gnu
crosstool-ng/samples/aarch64-unknown-linux-gnu at master · crosstool-ng/crosstool-ng
A versatile (cross-)toolchain generator. Contribute to crosstool-ng/crosstool-ng development by creating an account on GitHub.
Author   crosstool-ng
🌐
GitHub
github.com › tikv › tikv › issues › 4304
Cross Compile on target aarch64-unknown-linux-gnu · Issue #4304 · tikv/tikv
March 1, 2019 - Question Cannot Compile on target=aarch64-unknown-linux-gnu Before asking a question, make sure you have: Searched existing Stack Overflow questions. Googled your question. Searched open and closed GitHub issues Read the documentation: T...
🌐
SourceForge
sourceforge.net › home › open source software › software development › compilers › small device c compiler (sdcc) › files
Small Device C Compiler (SDCC) - Browse Files at SourceForge.net
Small Device C Compiler (SDCC) files. Full list of files for Small Device C Compiler (SDCC), The Small Device C Compiler (SDCC), targeting 8-bit architectures
🌐
Arm Community
community.arm.com › developer › tools-software › oss-platforms › f › gnu-toolchain-forum › 8329 › how-to-build-gcc-4-3-3-for-aarch64
How to build gcc 4.3.3 for aarch64? - Compilers and Libraries forum - Support forums - Arm Community
March 22, 2017 - Hi, How to build GCC 4.3.3 for ARM archicture? NAME="Red Hat Enterprise Linux Server" VERSION="7.3 (Maipo)" > uname -a Linux rhel7.local 4.5.0-15.el7.aarch64
🌐
Rust Programming Language
users.rust-lang.org › embedded
[Solved] Cross compile to aarch64 from windows10 - embedded - The Rust Programming Language Forum
November 29, 2018 - I am trying to compile from windows10 machine(MINGW64_NT-10.0) a simple hello world and try to run it in a aarch64 system(and hopefully other devices too like omega 2+). it works obviously in cargo run but when I try cargo build --target aarch64-unknown-linux-gnu it doesn't work.. here is the ...
🌐
Svbtle
robotsfuckyeahalloneword.svbtle.com › crosscompiling-to-aarch64
Cross-compiling to aarch64 • RobotsFuckYeah (all one word)
$ cd /path/to/safe_vault $ export SODIUM_LIB_DIR=/usr/local/lib $ cargo build --release --target=aarch64-unknown-linux-gnu
Top answer
1 of 1
12

The ADR instruction stores the offset from the current PC value to the label you reference.

When you have an instruction that references a symbol in a different object file (or in a different section in the same object file), the assembler can't encode the exact offset directly as it doesn't know how the linker will lay them out, but has to leave a relocation in the object file, instructing the linker to fix up the instruction once the exact location of the symbol is known.

I think the issue here is simply that the MachO object file (which is used on apple platforms) format doesn't have a relocation type for fixing up an ADR instruction pointing at a symbol elsewhere. And even if it had that, the construct is pretty brittle - the symbol that it points at has to be within +/- 1 MB from the instruction referencing it - that's a limit that is pretty easy to hit.

To get access to a bigger range, an ADRP+ADD instruction pair is often used, which gives you a +/- 4 GB range, and the MachO format does support those.

The assembler syntax for them differs a bit between MachO and ELF (and COFF). For MachO, the syntax looks like this:

adrp x0, symbol@PAGE
add x0, x0, symbol@PAGEOFF

Or if you want to load from it at the same time:

adrp x0, symbol@PAGE
ldr x1, [x0, symbol@PAGEOFF]

On ELF (the object file format used on Linux) and COFF (windows, when assembling GNU style assembly with LLVM) platforms, the syntax looks like this:

adrp x0, symbol
add x0, x0, :lo12:symbol
🌐
Reddit
reddit.com › r/asm › using adr in arm macos
r/asm on Reddit: Using ADR in ARM MacOS
June 17, 2021 -

I've been trying to learn ARM assembly for my m1 MBA by following along with this book and accompanying GitHub page updating it for Apple silicone. Unfortunately, I am running into the error "unknown AArch64 fixup kind!" when I try to use ADR or ADRP (LDR is not allowed on Apple silicone afik). So, If anyone knows why this error is popping and/or how to fix it, that would be awesome.

The Code:

.global _start
.align 2    //needed for mac os
_start: mov x0,#1           //stdout = 1
        adr x1, helloworld  //string to output
        mov x2, #16         //length of string
        mov x16, #4         //write sys call value
        svc 0               //syscall

//exit the program
mov x0, #0
mov x16, #1
svc 0
.data
helloworld: .ascii "Hello World!\n"

command to replicate the output:

as -o HelloWorld.o HelloWorld.s
🌐
Docker
hub.docker.com › layers › cubejs › cross › aarch64-unknown-linux-gnu-15082024 › images › sha256-1c21e28e9cfa2b64030a5fe0d45f2fae0e49766bbbfddc2f0e6e0fe87ec46611
cubejs/cross:aarch64-unknown-linux-gnu-15082024
Welcome to the world's largest container registry built for developers and open source contributors to find, use, and share their container images. Build, push and pull.
🌐
Rust Programming Language
users.rust-lang.org › help
Aarch64-unknown-linux-musl | fail with libssl-dev | how to crosscompile? - help - The Rust Programming Language Forum
February 26, 2024 - Hello, using a Debian 12 on x86_64. Wanna crosscompile for: aarch64-unknown-linux-musl Which packages I need to install to be able to compile error: failed to run custom build command for `openssl-sys v0.9.101` Caused by: process didn't exit successfully: `/home/developer/rust/weather/target/release/build/openssl-sys-c0a5fbbcbd9f5a89/build-script-main` (exit status: 101) --- stdout cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_MUSL_OPENSSL_LIB_DIR AARCH64_UNKNOWN_LINUX_MUSL_OPENS...