Open-source project
abhiTronix/raspberry-pi-cross-compilers avatar
abhiTronix/raspberry-pi-cross-compilers

raspberry-pi-cross-compilers: prebuilt GCC toolchains for every Pi variant

Latest GCC Cross Compiler & Native (ARM & ARM64) CI generated precompiled standalone toolchains for all Raspberry Pis. ๐Ÿ‡

672 stars112 forksShellGPL-3.0

At a glance

What is it?
raspberry-pi-cross-compilers rebuilds GCC cross and native toolchains for ARM and ARM64 in GitHub Actions and publishes the compressed binaries on SourceForge, with a separate build for each Raspberry Pi model. The value is a current compiler and a short path to a working cross compile, and the cost is that you are trusting a third party binary and giving up the distribution's own packaging.
Who is it for?
raspberry-pi-cross-compilers fits a developer who needs a current GCC for a specific Raspberry Pi board without spending an afternoon building one, and it does not fit a fleet with mixed boards or a team that wants the distribution to own its toolchain.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 125 days ago.
What is it written in?
Mainly Shell, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Toolchains rebuilt by CI on every change

This project provides the latest, CI maintained, precompiled, Raspberry Pi CPU optimized GCC cross and native toolchains for ARM and ARM64, as compressed standalone archives. The mechanism is GitHub Actions. The README says the project now uses a continuous integration pipeline to auto-compile the compressed GCC cross and native ARM and ARM64 toolchain binaries and to auto-deploy them to a SourceForge repository, and the badges at the top of the README show the builders split by hardware, with separate workflows for Pi 0-1, Pi 2-3, Pi 3 and later, Pi 64, and a docs deployer.

That split by hardware is the design in one line. A Raspberry Pi is not one target; the older boards have different cores and instruction sets, and a toolchain built for a Pi 5 will not run binaries on a Pi 1. The project therefore builds a distinct toolchain per variant, and the README lists the Raspberry Pi 5 among the variants covered.

The audience is stated plainly: everyone from professional developers to a college research student who wants an easy to deploy precompiled GCC toolchain for a hobby Raspberry Pi project. That is a wide audience, and the reason is that cross compiling for a Pi is a one or two hour problem the first time and a recurring nuisance afterwards, since the toolchain has to be rebuilt when the compiler version moves or when the target OS changes.

The project is maintained by Abhishek Thakur, who is credited in the header notice, and the licence is the GNU General Public License, version 3 or later.

Host OS and target OS are two different axes

The download table has a note that explains the whole matrix, and it is worth reading before anything else. Host OS is the operating system on which the toolchain is executed or used, and target OS is the operating system for which the toolchain generates code.

The rows are then combinations of the two. The Buster toolchains, for Debian 10, target the 32-bit Buster OS only, and run on any x64 or x86 Linux machine. The Bullseye row, for Debian 11, follows the same pattern, and the Bookworm row, for Debian 12, is the current generation alongside the v3.0 release. The status column marks Buster and Bullseye as stable and production.

Each row lists the precompiled GCC versions available, and the range shows the point of the project: Buster has builds from 8.3.0 through 10.2.0, 12.2.0, 13.3.0 and 14.2.0, and Bullseye starts at 10.2.0 and runs to the same 14.2.0. That is a range of compiler versions for the same target, which is the useful part, since a project may need to match a compiler version to a library build.

Two details in the same table matter. The Stretch toolchains for Debian 9, in both 32-bit and 64-bit, are flagged as no longer supported, so anything still pointing at Stretch has to move. And the release notes mention exclusive ARM64 and AARCH64 binaries for the 64-bit kernel OS flavours, which is a separate set from the 32-bit targets, since a 32-bit and a 64-bit Raspberry Pi OS need different cross compilers and different sysroots.

Compression, relocatable paths and a bundled debugger

Three details of the v3.0 release make the archives pleasant to work with, and each of them solves a specific annoyance.

The first is compression. The archives are PIGZ-TAR compressed binaries, described as compressed with the maximum possible compression. PIGZ is a parallel implementation of gzip, so the archive decompresses faster than a plain gzip one, which matters when the toolchain is several hundred megabytes and you are unpacking it on a laptop. The two stage format, a tar inside a gzip stream, is what lets the archive decompress in one pass.

The second is that the toolchains are hardcoded-path free, for both the cross and the native variants. That phrase describes a problem most people hit once: a compiler built with absolute paths baked in looks for its own libraries and headers in the directory it was built in, so moving the toolchain breaks it. Without hardcoded paths, you can unpack the archive anywhere, which is what makes it usable from a container or from a build directory that is not yours.

The third is that the latest GDB debugger, version 15.1, is included in all the binaries. Debugging a cross compiled target is where a missing debugger wastes an afternoon, and bundling it means the toolchain is self contained for the debug cycle as well as the build cycle.

The compiler itself is GCC 14.2.0 in the current release, and the archives are targeted at the Raspbian Bookworm OS based on Debian 12.

The build scripts are published so you can rebuild rather than trust

The project offers two routes, and the README presents them as a first section for the precompiled toolchains and a second section for developers who want to do it themselves.

The second route exists because a precompiled binary is a claim. The repository publishes the build scripts, and the top level holds a build-scripts directory, a patches directory, a utils directory and a docs directory, with the GitHub workflows under .github. So the same source that produces the SourceForge archives is available, and a team that needs a toolchain for a configuration nobody publishes, a specific GCC patch, or an unusual target can build it.

This is the difference in approach between the two tracks, and it is worth being precise about it. The precompiled track optimises for time to first build: download, unpack, set a path, compile. The script track optimises for control: you choose the GCC version, the sysroot, the patches, and you own the result, at the cost of a build that runs for a long time and needs the build dependencies installed locally.

The project leans towards the second route as a matter of principle. The release notes list the open sourced toolchain build scripts as a feature alongside the precompiled binaries, and the CI pipeline itself is the same automation applied to the maintainer's own environment. A team that wants the toolchain to match a corporate build image, or to include an internal patch, has a supported path rather than a fork of a binary.

The third and fourth sections of the README, on building for developers and on cross compiling the latest Qt framework, extend the same idea to a specific hard case.

Qt is the case the guide takes on

Cross compiling Qt for a Pi is the part of embedded development where a prebuilt toolchain stops being enough, and the project treats it as a headline feature rather than an aside.

The release notes list a comprehensive guide for cross compiling the latest Qt for any Raspberry Pi variant or model available, and the guide lives in the repository as QT_build_instructions.md. The topic list for the project includes qt and qt6, along with cmake, which is what a Qt cross build is really about, since Qt is built with CMake and the toolchain file has to point at your sysroot, your Qt installation and your compiler.

The reason this case is hard is worth stating, because it explains why a separate document is needed. A plain C program cross compiled with the right flags is a one line change in a build system. A Qt application needs a matching host build of the same Qt version, a target build for the Pi CPU, a deployment step for the platform plugins and the libraries, and usually a device path policy. A toolchain gets you the compiler; the guide is about the rest.

So the same archive that handles a small C project for a Pi 5 is the base for a Qt application, and the project treats that as the reason to publish the instructions rather than only the binaries.

The reference section of the README also promises information on supported hardware, supported programming languages and the optimization flags involved, which is the section that tells you what the per model binaries are actually tuned for.

Per model binaries are the feature and the constraint

The README describes the toolchains as Raspberry Pi CPU optimized, and the reference section has a subsection titled optimization flags involved. This is the sharpest trade in the project, and it deserves a plain statement.

A Pi-specific toolchain is built with a target CPU that matches the board, and the compiler can use instructions the older boards do not have. That is why a Pi 5 build can be faster than a generic ARM build on the same board, and it is also why a Pi 1, a Pi 3 and a Pi 5 need different archives, which is what the split CI workflows are for.

The constraint follows directly. A binary compiled for the newest board may not start on an older one, so the archive you need is determined by the board you are targeting, and the choice of compiler flags is baked in at build time rather than being something you tune per project. If your fleet is mixed, you are managing several toolchains rather than one.

The alternative approach is to skip the precompiled binaries and use the distribution's own cross compilers, the arm-linux-gnueabihf and aarch64-linux-gnu packages that Debian and Raspberry Pi OS ship, or to build inside a container that carries the toolchain. The difference in approach is real. The distribution packages are maintained alongside the OS, integrate with the package manager, and are pinned to a compiler version that is sometimes behind what you want. These precompiled archives give you a current GCC, tuned to the board, available without a multi hour build.

Which one is right depends on whether compiler version or system integration matters more to your project, and the README does not argue for one over the other.

Release tags lag the CI, and the licence is GPL-3.0

The maintenance picture has two halves, and they point in different directions.

The repository is not archived and the last push was on 2026-06-20, so the build scripts and the CI are being worked on. The published release tags, however, are all from a single day: v3.1.1-alpha, v3.1.1-alpha2 and v3.1.1-alpha3 were all published on 2024-08-31, and the v3.0 release notes describe the current GCC 14.2.0 toolchains. So the tags are old while the commits are recent, and the binaries on SourceForge are refreshed by the CI rather than by a tagged release.

That has a concrete consequence for how you consume this project. The archive you download is a CI artefact, and the version label in its name reflects the CI build rather than a release you can diff against a changelog. If reproducibility matters to your build, you need to keep the archive you used, because a later CI run of the same scripts can produce a different set of binaries.

The licence is the GNU General Public License version 3 or later, with the full notice at the top of the README, and the copyright held by Abhishek Thakur for 2020. The GPL obligations attach to the build scripts that this repository publishes and to redistribution of the artifacts, and the toolchain binaries themselves carry the licences of the components inside them, which is a separate question to check before you mirror them internally.

The project also links a SourceForge project page as its homepage, and the README keeps a citation section, a support section and an acknowledgements section, which is the paper trail you would expect from a project that asks users to redistribute its output.

Editorial conclusion

raspberry-pi-cross-compilers fits a developer who needs a current GCC for a specific Raspberry Pi board without spending an afternoon building one, and it does not fit a fleet with mixed boards or a team that wants the distribution to own its toolchain. Before adopting it, check that the target Debian release is still covered, since the Stretch toolchains are no longer supported, and keep the exact archive you used, because the published binaries are CI artefacts rather than tagged releases.

Frequently asked questions

What does the raspberry-pi-cross-compilers project provide?

Precompiled, compressed GCC cross and native toolchains for ARM and ARM64, built for specific Raspberry Pi variants and Debian based target systems, published on SourceForge by a GitHub Actions pipeline. The current v3.0 line targets Raspbian Bookworm based on Debian 12 with GCC 14.2.0 and GDB 15.1.

Which Raspberry Pi and Debian versions are supported?

The download table covers Buster (Debian 10), Bullseye (Debian 11) and Bookworm (Debian 12) targets, each in 32-bit form with separate ARM64 and AARCH64 binaries for the 64-bit kernel flavours, and with a separate build per Pi variant including the Pi 5. The Stretch toolchains for Debian 9 are no longer supported.

How are the toolchains built and distributed?

The project uses GitHub Actions to auto-compile the compressed toolchain binaries and auto-deploy them to a SourceForge repository, with separate CI workflows for Pi 0-1, Pi 2-3, Pi 3 and later, Pi 64 and the docs deployer. The build scripts are also published in the repository so a toolchain can be built locally.

Why use a precompiled Raspberry Pi toolchain instead of the distribution packages?

The precompiled archives give you a current GCC tuned to the target Pi CPU with no local build step, and they are compressed with PIGZ-TAR and have no hardcoded paths so they can be unpacked anywhere. The distribution cross compiler packages are maintained with the OS and integrate with the package manager, but they ship an older compiler.

How do I cross compile Qt for a Raspberry Pi with this project?

The repository publishes a comprehensive guide for cross compiling the latest Qt for any Raspberry Pi variant or model, in the file QT_build_instructions.md. The README lists it as a headline feature of the v3.0 release, alongside the cmake and qt6 topics covered by the project.

Official sources

  1. abhiTronix/raspberry-pi-cross-compilers on GitHub
  2. License: GPL-3.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/abhitronix-raspberry-pi-cross-compilers.svg)](https://hysenlabs.com/projects/abhitronix-raspberry-pi-cross-compilers)

Was this useful?