GCC toolchain targeting older glibc versions, designed for building Linux binaries that run across a wide range of
distributions. Intended for use inside a Docker container running Ubuntu 26.04 or later. This toolchain is built
using Crosstool-NG.
The usual method for producing portable Linux binaries is to compile them on an outdated distribution (e.g., CentOS 7).
This repository provides a modern alternative: a GCC toolchain configured to target an older glibc, ensuring
compatibility and preventing errors like:
/lib64/libc.so.6: version `GLIBC_2.XX' not found
| Component |
Version |
| GCC |
16.1.0 |
| glibc |
2.17 |
| Binutils |
2.46.1 |
| GDB |
17.2 |
| Component |
Version |
| GCC |
16.1.0 |
| musl |
1.2.6 |
| Binutils |
2.46.1 |
| GDB |
17.2 |
| Component |
Version |
| GCC |
16.1.0 |
| glibc |
2.26 |
| Binutils |
2.46.1 |
| GDB |
17.2 |
| Component |
Version |
| GCC |
16.1.0 |
| musl |
1.2.6 |
| Binutils |
2.46.1 |
| GDB |
17.2 |
| Component |
Version |
| GCC |
16.1.0 |
| glibc |
2.26 |
| Binutils |
2.46.1 |
| GDB |
17.2 |
| Component |
Version |
| GCC |
16.1.0 |
| glibc |
2.30 |
| Binutils |
2.46.1 |
| GDB |
17.2 |
If you prefer not to build the toolchain yourself, a precompiled GCC toolchain for each supported architecture can be
downloaded from the releases page.
curl -sSLo gcc-x86_64-linux-gnu.tar.gz https://github.com/prepkg/gcc-toolchain/releases/latest/download/gcc-x86_64-linux-gnu.tar.gz
curl -sSLo gcc-x86_64-linux-musl.tar.gz https://github.com/prepkg/gcc-toolchain/releases/latest/download/gcc-x86_64-linux-musl.tar.gz
curl -sSLo gcc-aarch64-linux-gnu.tar.gz https://github.com/prepkg/gcc-toolchain/releases/latest/download/gcc-aarch64-linux-gnu.tar.gz
curl -sSLo gcc-aarch64-linux-musl.tar.gz https://github.com/prepkg/gcc-toolchain/releases/latest/download/gcc-aarch64-linux-musl.tar.gz
curl -sSLo gcc-arm-linux-gnueabi.tar.gz https://github.com/prepkg/gcc-toolchain/releases/latest/download/gcc-arm-linux-gnueabi.tar.gz
curl -sSLo gcc-riscv64-linux-gnu.tar.gz https://github.com/prepkg/gcc-toolchain/releases/latest/download/gcc-riscv64-linux-gnu.tar.gz
git clone https://github.com/prepkg/gcc-toolchain.git && cd gcc-toolchain
./setup.sh build-toolchain
- (Optional) Check the toolchain component versions:
After compilation, the toolchains for each architecture will be available in the build directory.