| Reading time: | 15 min |
| Last updated: | 9 Apr 2026 |
| Reading time: |
| 15 min |
| Last updated: |
| 9 Apr 2026 |
This guide shows you how to install and use the tool with the most common configuration. For advanced options and complete reference information, see the official documentation. Some install guides also include optional next steps to help you explore related workflows or integrations.
GCC is available on all Linux distributions and can be installed using the package manager.
This covers gcc and g++ for compiling C and C++ as a cross-compiler targeting the Arm Linux architecture. For bare-metal and embedded targets such as arm-none-eabi, see the
Arm GNU Toolchain
install guide.
GCC is used to cross-compile Linux applications targeting Arm. Applications can be compiled for 32-bit or 64-bit Arm Linux systems.
The executables for 32-bit are arm-linux-gnueabihf-gcc and arm-linux-gnueabihf-g++.
The executables for 64-bit are aarch64-linux-gnu-gcc and aarch64-linux-gnu-g++.
Software can be compiled on an x86_64 or Arm host machine.
The Linux package manager downloads the required files. No manual download is needed.
You can install a GCC cross compiler with Arm as a target architecture using Linux package managers.
Use the apt command to install the cross-compilers for 32-bit and 64-bit Arm Linux targets.
sudo apt update
sudo apt install gcc-arm-linux-gnueabihf -y
sudo apt install gcc-aarch64-linux-gnu -y
The GCC version installed is tied to your Ubuntu release. For example, Ubuntu 24.04 LTS provides GCC 13 and Ubuntu 25.10 provides GCC 15. This is normal Ubuntu packaging behaviour.
Fedora uses the dnf package manager.
If the machine has sudo you can use it:
sudo dnf update -y
sudo dnf install gcc-aarch64-linux-gnu -y
sudo dnf install gcc-arm-linux-gnu -y
If sudo is not available become root and omit the sudo from the above commands:
dnf update -y
dnf install gcc-aarch64-linux-gnu -y
dnf install gcc-arm-linux-gnu -y
On Fedora, only building kernels is currently supported. Support for cross-building user space programs is not currently provided, as that would massively multiply the number of packages.
GCC is open source and freely available for use.
To confirm the installations are successful, enter:
aarch64-linux-gnu-gcc --version
arm-linux-gnueabihf-gcc --version
To cross-compile an example program, create a text file named hello-world.c with the contents below.
#include <stdio.h>
int main()
{
printf("Hello, Arm World!\n");
return 0;
}
To cross-compile for a 64-bit Arm Linux target. On Fedora, only building kernels is currently supported, so these examples apply to Ubuntu.
aarch64-linux-gnu-gcc hello-world.c -o hello-world-aarch64.elf
To cross-compile for a 32-bit Arm Linux target:
arm-linux-gnueabihf-gcc hello-world.c -o hello-world-arm.elf
How would you rate this tool quick-install guide?
What is the primary reason for your feedback ?
Thank you! We're grateful for your feedback.