Sign inSign up

daryltucker/gcc

By daryltucker

•Updated 8 months ago

Hermetic GCC toolchains with Sovereign RPATH. Portable binaries across distributions.

Image
Security
Integration & delivery
Developer tools
0

913

daryltucker/gcc repository overview

⁠GCC Toolchain Docker Images

Hermetic, portable GCC toolchains with Sovereign RPATH binaries

Self-contained GCC compiler toolchains built from source with embedded library search paths. Binaries produced by these compilers work across Linux distributions without LD_LIBRARY_PATH.


⁠Quick Start

# Pull the latest GCC 15.2.0
docker pull daryltucker/gcc:15.2.0

# Compile a program
docker run --rm -v $(pwd):/work -w /work daryltucker/gcc:15.2.0 \
  /opt/toolchains/gcc-15.2.0/*/bin/gcc -o hello hello.c

# Run it (no LD_LIBRARY_PATH needed)
./hello

⁠Features

ā šŸ”’ Hermetic Builds

Every toolchain is built from source with all dependencies self-contained. No host system libraries, no distribution-specific quirks.

ā šŸš€ Sovereign RPATH

Binaries created by these compilers have embedded library search paths. They work on bare systems without environment configuration.

ā šŸ“¦ Complete Toolchains

Each image includes:

  • GCC (C, C++, Fortran)
  • Binutils (as, ld, ar, objdump, etc.)
  • Glibc (or Newlib for bare-metal)
  • Math libraries (GMP, MPFR, MPC, ISL)
ā šŸŽÆ Multiple Architectures
  • Native: x86_64, optimized builds (Legion S7, etc.)
  • Cross-compile: aarch64 (RPi5), powerpc64 (PS3 PPU)
  • Bare-metal: spu-elf (PS3 SPU)

⁠Available Images

⁠GCC Versions
TagGCCGlibcBinutilsNotes
15.2.015.2.02.422.44Latest stable
14.2.014.2.02.402.43
13.3.013.3.02.382.41
12.4.012.4.02.382.40
10.2.010.2.02.382.40
9.5.09.5.02.382.40
⁠Optimized Builds
TagArchitectureOptimizations
13.3.0-legion_s7AMD Zen 3-march=znver3 -mtune=znver3
12.4.0-rpi5ARM Cortex-A76Raspberry Pi 5 optimized
⁠Cross-Compile Toolchains
TagTargetUse Case
12.4.0-aarch64ARM 64-bitGeneral aarch64
7.2.0-powerpc_ps3_ppu_v7PowerPC64 BEPS3 Linux (PPU)
9.5.0-powerpc_ps3_spu_v9SPUPS3 bare-metal (SPU)

⁠Usage Examples

⁠Native Compilation
docker run --rm -v $(pwd):/work -w /work daryltucker/gcc:15.2.0 \
  /opt/toolchains/gcc-15.2.0/*/bin/gcc -O2 -o myapp myapp.c
⁠Cross-Compilation (RPi5)
docker run --rm -v $(pwd):/work -w /work daryltucker/gcc:12.4.0-rpi5 \
  /opt/toolchains/gcc-12.4.0_rpi5/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc \
  -o hello-rpi hello.c
⁠Interactive Development
docker run -it --rm -v $(pwd):/work -w /work daryltucker/gcc:15.2.0 bash
# Inside container:
export PATH=/opt/toolchains/gcc-15.2.0/x86_64-linux-gnu/bin:$PATH
gcc --version

⁠Image Naming Convention

daryltucker/gcc:{HOST_ARCH}-{VERSION}[-{PROFILE}]-{TARGET_ARCH}

Examples:

  • daryltucker/gcc:15.2.0 → x86_64 native build
  • daryltucker/gcc:x86_64-gcc-13.3.0_legion_s7-x86_64 → Full identity
  • daryltucker/gcc:12.4.0-rpi5 → Shortcut for RPi5 cross-compiler

Shortcuts: The most common host arch (x86_64) omits the host prefix in short tags.


⁠Toolchain Layout

All toolchains follow a hierarchical structure:

/opt/toolchains/
└── gcc-{VERSION}[_{VARIANT}]/
    └── {TARGET_TUPLE}/
        ā”œā”€ā”€ bin/          # Compiler binaries
        ā”œā”€ā”€ lib/          # Runtime libraries
        ā”œā”€ā”€ lib64/        # 64-bit libraries
        └── sysroot/      # Target headers/libs (cross-compile only)

Find your compiler:

find /opt/toolchains -name "*-gcc" -type f

⁠Verification

All binaries produced by these compilers are self-contained:

# Compile a test
docker run --rm -v $(pwd):/work -w /work daryltucker/gcc:15.2.0 \
  /opt/toolchains/gcc-15.2.0/*/bin/g++ -o test test.cpp

# Check dynamic linker path (points to toolchain, not system)
readelf -l test | grep interpreter

# Check library paths (RPATH embedded)
readelf -d test | grep RPATH

# Run without LD_LIBRARY_PATH
./test

Expected output:

  • Interpreter: /opt/toolchains/gcc-15.2.0/.../lib/ld-linux-x86-64.so.2
  • RPATH: /opt/toolchains/gcc-15.2.0/.../lib64:/opt/.../lib

⁠Source & Documentation


⁠License

The GCC toolchains are distributed under the GNU GPL. The Docker build system and configuration files are provided as-is.


⁠Support

These images are built for production use with a focus on:

  • āœ… Reproducible builds
  • āœ… Binary portability
  • āœ… Self-contained toolchains
  • āœ… No host dependencies

For issues or questions about specific builds, please refer to the build logs embedded in each image at /opt/toolchains/*/logs/.


Last Updated: 2025-12-22
Maintained by: Daryl Tucker

Tag summary

Content type

Image

Digest

sha256:8c2d2e80d…

Size

1.1 GB

Last updated

8 months ago

docker pull daryltucker/gcc:x86_64-gcc-15.2.0_jetson_orin_nano_separate-aarch64