-
Notifications
You must be signed in to change notification settings - Fork 27
Cross Compiler
vraevsky edited this page Mar 18, 2026
·
1 revision
- Download the kernel.org compiler:
cd ~/Downloads wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/15.2.0/x86_64-gcc-15.2.0-nolibc-aarch64-linux.tar.xz
- Install it:
sudo tar -C /opt -xf ~/Downloads/x86_64-gcc-15.2.0-nolibc-aarch64-linux.tar.xz
- Set environment variables:
export ARCH=arm64 export CROSS_COMPILE=/opt/gcc-15.2.0-nolibc/aarch64-linux/bin/aarch64-linux-
- Get the compiler version information.
Make sure that the compiler installed and the environment set correctly, issue:
${CROSS_COMPILE}gcc -v
Using built-in specs.
COLLECT_GCC=/opt/gcc-15.2.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc
COLLECT_LTO_WRAPPER=/opt/gcc-15.2.0-nolibc/aarch64-linux/bin/../libexec/gcc/aarch64-linux/15.2.0/lto-wrapper
Target: aarch64-linux
Configured with: /home/arnd/git/gcc/configure --host=x86_64-linux-gnu --build=aarch64-pc-linux-gnu --target=aarch64-linux --enable-targets=all --prefix=/home/arnd/cross/x86_64/gcc-15.2.0-nolibc/aarch64-linux --enable-languages=c --without-headers --disable-bootstrap --disable-nls --disable-threads --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-decimal-float --disable-libquadmath --disable-libatomic --disable-libcc1 --disable-libmpx --enable-checking=release --with-static-standard-libraries --disable-plugin --with-newlib --enable-decimal-float
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 15.2.0 (GCC)