Skip to content

f0rmiga/gcc-builds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCC Builds

This repository contains the definitions and scripts to build optimized toolchains for x86_64, armv7 and aarch64 (aka arm64 and armv8) architectures. The build process has been unified to create both GCC binaries and sysroots in a single, efficient compilation pipeline.

Building the Toolchains

Use the build.sh script to build the sysroots and GCC binaries using Docker. The current restriction is that the container must run in x86_64. The sysroots for other architectures are built using cross-compilation from x86_64.

Using the Build Script

Building the Toolchains

./build.sh 14.3.0 x86_64 .
./build.sh 14.3.0 armv7 .
./build.sh 14.3.0 aarch64 .

Output

The build process generates optimized toolchain archives:

  • gcc-toolchain-14.3.0-x86_64.tar.xz
  • gcc-toolchain-14.3.0-armv7.tar.xz
  • gcc-toolchain-14.3.0-aarch64.tar.xz

These archives contain both the GCC binaries and the corresponding sysroot, providing a complete hermetic toolchain for each target architecture.

Linkers

Each toolchain ships with multiple linkers:

  • ld / ld.bfd and ld.gold from binutils (GNU ld is the default).
  • ld.lld from LLD, built from source as part of the same pipeline.

LLD is built from the LLVM sources alongside GCC and binutils. Because LLD is a single, inherently cross-target linker, one x86_64 host build links for every supported target. To use it instead of GNU ld, pass -fuse-ld=lld to the compiler:

gcc -fuse-ld=lld -o hello hello.c

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors