Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

How to start with crosscompiling Mac -> AROS ARM64

Last updated on 2 hours ago
B
BohunMember
Posted 2 hours ago
I know, its simply for developers, but I dont understand what I need to do to start crosscompiling Sad

Gemini:

To cross-compile from macOS for the AROS AArch64 platform (ARM64, e.g., for Pinebook, 64-bit Raspberry Pi 3/4, or QEMU virtual machines), your local gcc-16 is not enough.

AROS uses a specific ELF binary format with its own ABI, C standard library (clib2 or AROS libc), and a set of AmigaOS/AROS system headers (<proto/dos.h>, <proto/intuition.h>, etc.).

Here is how to set up the workflow:

Step 1: Set Up the Environment (Docker / Container)

Building the AROS toolchain directly on macOS can be troublesome due to the default case-insensitive filesystem and specific GNU tool requirements. The cleanest approach on macOS Apple Silicon is using a Linux container (e.g., OrbStack or Docker Desktop).
AROS source and configuration script:
The AROS repository includes scripts to configure the cross-toolchain:
Bash

git clone https://github.co...m/AROS.git
cd AROS
./configure --target=arm64-arm-aarch64
make toolchain
make sdk


SDK build output:
The output directory will contain:
The compiler: aarch64-aros-gcc (or a wrapper script calling gcc with the appropriate flags)
The sysroot/SDK tree with AROS headers and libraries: .../AROS/Development

Step 2: Configure a Compiler Wrapper
In practice, compiling a program for AROS involves calling the compiler with the --sysroot parameter pointing to the SDK files:
Bash

aarch64-aros-gcc --sysroot=/path/to/AROS/Development main.c -o my_program


You can create a simple wrapper script on macOS at ~/bin/aros-gcc:

Bash

#!/bin/bash
# If you have the toolchain locally:
/path/to/toolchain/aarch64-aros-gcc --sysroot=/path/to/AROS/Development "$@"

# OR if you run it via Docker:
# docker run --rm -v "$(pwd):/work" -w /work aros-sdk aarch64-aros-gcc "$@"


Remember to make it executable: chmod +x ~/bin/aros-gcc.

Step 3: Integrate with Geany on macOS
Once you have the aros-gcc command accessible in your terminal:
Open your source code file in Geany (e.g., a program using AROS libraries).
Go to: Build $rightarrow$ Set Build Commands.In the C source commands section:
Compile:
Plaintext

aros-gcc -Wall -c "%f"

Build:
Plaintext

aros-gcc -Wall -o "%e" "%f"


Click OK to save.
Example Test Code for AROS

C

#include <proto/dos.h>
#include <proto/exec.h>
#include <stdio.h>

int main(int argc, char **argv) {
PutStr("Hello from AROS AArch64!n"Wink;
printf("Called with arguments: %dn", argc);
return 0;
}


Pressing F9 in Geany will produce a binary ready to be transferred to an AROS system or booted inside QEMU (qemu-system-aarch64).
B
BohunMember
Posted 2 hours ago
Please explain to me what exactly I should do in the first step
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Users who participated in discussion: Bohun