You can force a version:

apt-get install gcc-arm-linux-gnueabihf=4:9.3.0-1ubuntu2

From man apt-get: install pkg [{=pkg_version_number | /target_release}]...

Answer from user.dz on askubuntu.com
🌐
Arch Linux
aur.archlinux.org › packages › arm-linux-gnueabihf-gcc
AUR (en) - arm-linux-gnueabihf-gcc
This process involves cloning the gcc repo three times and the glibc repo twice. Due to all of this, building the toolchain will take over 11GB of space. In case it helps anyone, here's the current functional process until this is fixed and/or streamlined: Create and configure an isolated PGP keyring directory for AUR: (umask 077 && mkdir -p ~/.gnupg-aur) export GNUPGHOME=$HOME/.gnupg-aur · Install arm-linux-gnueabihf-gcc-stage1 from AUR (with -binutils dependency).
Discussions

ubuntu - How to install "gcc-arm-linux-gnueabihf" specific version? - Stack Overflow
@Karma Yogi You may give a try ... for gcc 4.9.3, having been released in 2016. ... Save this answer. ... Show activity on this post. As pointed-out by old_timer, you could download/use a pre-built toolchain. You could for example use the arm-linux-gnueabihf-gcc provided ... More on stackoverflow.com
🌐 stackoverflow.com
Where to get recent arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ for openSUSE?
Where to get recent arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ for openSUSE? Previously I was using gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf but it’s discontinued and only gcc-7.5 is supported. We now have gcc-14.x Other Linux distributions are having their own package Using ... More on forums.opensuse.org
🌐 forums.opensuse.org
0
0
June 1, 2025
How to install gcc-arm-linux-gnueabihf 4.9 on ubuntu 22.04 for arm 32 bit
I would like to know how can I install gcc-arm-linux-gnueabihf version 4 (maybe the 4.9 is good) on that os because I want to recompile the kernel 3.3 because it wants that. More on reddit.com
🌐 r/linuxquestions
13
7
August 30, 2022
Iconoclasts / Box86 help for PiBoy

These tutorials look amazing. Would you be so kind to share all the steps you did so far to try to make this game work?

More on reddit.com
🌐 r/PiBoy
5
5
November 28, 2021
🌐
LinuxVox
linuxvox.com › blog › arm-linux-gnueabihf-gcc
Mastering arm-linux-gnueabihf-gcc: A Comprehensive Guide — linuxvox.com
It is a cross-compiler that allows developers to compile code on a host system (usually a x86-based Linux machine) for an ARM target system running Linux. The gnueabihf in its name stands for GNU C Library (glibc) and the ARM EABI Hard Float ...
Top answer
1 of 1
1

You can run arm-linux-gnueabihf-gcc-5 instead of gcc.

This file list includes the names of the other tools the gcc-5-arm-linux-gnueabihf package places in /usr/bin, which you may find useful. (You didn't mention what release you're running but I'm guessing it's 18.04, since that release is a popular LTS and it defaults to version 7.)

Note that even if you wanted to use the default version, unless you've changed what /usr/bin/gcc points to (which I don't recommend), the gcc command is running a GCC compiler that generates native executables. This won't be an ARM compiler unless your Ubuntu system is running on ARM. To run the default version of the GCC cross compiler for armhf, use arm-linux-gnueabihf-gcc (and see this file list).

Multiple versions of both native and cross compilers can be installed on the same system at the same time. Only the default version of the native GCC compiler is typically invoked with the gcc command, however. Other commands have a toolchain prefix, a version suffix, or (in this case) both. This is the case even when that non-default compiler is the only compiler installed on the system.

If you really must make gcc call that compiler...

If you need gcc to call that compiler because some other build tool, like make is calling gcc, the best approach is usually to reconfigure that other tool or to set the CC environment variable to the compiler you want. Just making gcc run the compiler you need may also not be sufficient, because the names of other tools will still run the native versions.

With that said, assuming your your Ubuntu system is not an armhf system but you still really want gcc to run the arm-linux-gnueabihf-gcc-5 cross compiler, you have a few options. You could replace the /usr/bin/gcc symlink (which on 18.04 links to gcc-7), but I recommend against that. Doing that is likely to break anything that assumes gcc is a native compiler, and may either interfere with or be undone by future package management operations.

Instead, you could put a gcc symlink to arm-linux-gnueabihf-gcc-5 in your user's private bin directory ~/bin. The default per-user ~/.profile file adds that directory to $PATH when you log in, if the directory exists. Automated builds (like when you run ./configure or cmake .. and then make) that you don't customize usually use cc, which will continue to be a symlink to a native compiler, so this shouldn't break things.

Personally, I would not want to do even this, because I would myself become confused. I prefer that it always be immediately clear what platform my compiler targets, when it is a cross compiler.

🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › beginners
SOLVED: What is arm-linux-gnueabihf? - Raspberry Pi Forums
November 20, 2021 - I've been looking through my Pi ... called arm-linux-gnueabihf. I've been looking around and I can't seem to figure out what it is. Is it safe to delete? It takes up 700 MiB so I want to delete it. Thanks · Last edited by IceBotYT on Sun Nov 21, 2021 1:47 am, edited 1 time in total. ... Ah, after some more digging I found this page https://packages.debian.org/stretch/gcc ...
🌐
Debian
packages.debian.org › sid › gcc-arm-linux-gnueabihf
Debian -- Details of package gcc-arm-linux-gnueabihf in sid
gcc-mipsel-linux-gnu · This is the GNU C compiler, a fairly portable optimizing compiler for C. This is a dependency package providing the default GNU C cross-compiler for the armhf architecture. dep: cpp-arm-linux-gnueabihf (= 4:15.2.0-5+b1) GNU C preprocessor (cpp) for the armhf architecture ·
🌐
GitHub
github.com › crux-arm › crux-toolchain-arm-linux-gnueabihf
GitHub - crux-arm/crux-toolchain-arm-linux-gnueabihf: CRUX-ARM Toolchain using hard-float version of the "new" ABI (EABI), targeting armv7 and up · GitHub
arm-linux-gnueabihf is a cross-compilation toolchain designed for targeting ARM processors running Linux, specifically for systems that support hardware floating-point operations (hard-float).
Author   crux-arm
Find elsewhere
🌐
Homebrew
formulae.brew.sh › formula › arm-linux-gnueabihf-binutils
arm-linux-gnueabihf-binutils — Homebrew Formulae
brew install arm-linux-gnueabihf-binutils · FSF/GNU binutils for cross-compiling to arm-linux · https://www.gnu.org/software/binutils/binutils.html · License: GPL-3.0-or-later · Development: Pull requests · Formula JSON API: /api/formula/arm-linux-gnueabihf-binutils.json ·
🌐
Arm Developer
developer.arm.com › downloads › - › gnu-a
Downloads | GNU-A Downloads – Arm Developer
arm-none-linux-gnueabihf-ld.gold.exe · have additional dependencies on the following dlls: libwinpthread-1.dll · libgcc_s_sjlj-1.dll · libstdc++-6.dll · libgcc_s_dw2-1.dll · You can obtain the required dlls from the MinGW-W64 GCC-8.1.0 packages from SourceForge: i686-posix-sjlj ·
🌐
Duetorun
duetorun.com › blog › 20230401 › arm-toolchain
Arm GNU Toolchain - ElseWhere
For the Arm 32-bit, we need to run the compatible GCC version. $ arm-linux-gnueabihf-gcc -x c -E -dM /dev/null | grep -E "__ARM_ARCH_ISA_|__ARM_(32|64)BIT_STATE" #define __ARM_ARCH_ISA_ARM 1 #define __ARM_32BIT_STATE 1 #define __ARM_ARCH_ISA_THUMB 2
🌐
GitHub
github.com › eckucukoglu › arm-linux-gnueabihf
GitHub - eckucukoglu/arm-linux-gnueabihf: gcc version: 4.9.2, glibc version: 2.19, binutils version: 2.24, gdb version: 7.6.1, kernel headers version: 199248 (3.10.80) · GitHub
gcc version: 4.9.2, glibc version: 2.19, binutils version: 2.24, gdb version: 7.6.1, kernel headers version: 199248 (3.10.80) - eckucukoglu/arm-linux-gnueabihf
Starred by 9 users
Forked by 2 users
Languages   Python 40.8% | HTML 25.7% | C 15.8% | C++ 10.7% | Roff 3.5% | Perl 1.2%
🌐
Arch Linux
aur.archlinux.org › packages › arm-linux-gnueabihf-gcc-stage1
AUR (en) - arm-linux-gnueabihf-gcc-stage1
GitLab · Security · AUR · Download · AUR Home · Packages · Register · Login · View PKGBUILD / View Changes · Download snapshot · Search wiki · Flagged out-of-date (2026-06-01) arm-linux-gnueabihf-binutilsAUR (arm-linux-gnueabihf-linaro-binAUR) binutils (make) gcc (gcc-gitAUR, gccrs-gitAUR, gcc-snapshotAUR) (make) glibc (glibc-gitAUR, glibc-eacAUR, glibc-git-native-pgoAUR) (make) zlib (zlib-gitAUR, zlib-ng-compat-gitAUR, zlib-ng-compat) (make) arm-linux-gnueabihf-glibc-headers (make) git+https://sourceware.org/git/gcc.git#commit=76aeacb436dfad649974cf5f61ec1ce6dd5f8417 ·
🌐
Acmesystems
acmesystems.it › arm9_toolchain
Install the ARM cross compiler toolchain on your Linux PC
sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf · If you are using an Arietta, Aria or FOX G20 board: sudo apt install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi · Now you are ready to cross-compile on your PC all the source available for the Acme Boards based on Microchip MPUs.
🌐
openSUSE Forums
forums.opensuse.org › english › applications
Where to get recent arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ for openSUSE? - Applications - openSUSE Forums
June 1, 2025 - Where to get recent arm-linux-gnueabihf-gcc & arm-linux-gnueabihf-g++ for openSUSE? Previously I was using gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf but it’s discontinued and only gcc-7.5 is supported. We now have gcc-14.x Other Linux distributions are having their own package Using https://rpm.pbone.net/search_simple_2 I cannot find any openSUSE Tumbleweed package that provides arm-linux-gnueabihf-g++ I think opensuse team should consider having official or at least experimental ...
🌐
Ubuntu
launchpad.net › ubuntu › focal › amd64 › gcc-arm-linux-gnueabihf › 4:9.3.0-1ubuntu2
4:9.3.0-1ubuntu2 : gcc-arm-linux-gnueabihf : amd64 : Focal (20.04) : Ubuntu
gcc-arm-linux-gnueabihf · 4:9.3.0-1ubuntu2 · This is the GNU C compiler, a fairly portable optimizing compiler for C. . This is a dependency package providing the default GNU C cross-compiler for the armhf architecture.
🌐
Ubuntu
packages.ubuntu.com › bionic › gcc-arm-linux-gnueabihf
Ubuntu – Error
two or more packages specified (gcc-arm-linux-gnueabihf bionic) Content Copyright © 2025 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
🌐
Arm Developer
developer.arm.com › downloads › - › arm-gnu-toolchain-downloads
Arm GNU Toolchain Downloads – Arm Developer
Download the Arm GNU Toolchain, an open-source suite of tools for C, C++, and Assembly programming for the Arm architecture.