Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/f0rmiga/gcc-toolchain
A fully-hermetic Bazel GCC toolchain for Linux.
https://github.com/f0rmiga/gcc-toolchain
aarch64 armv7 bazel bazel-rules c cpp fortran gcc linux rbe x86-64
Last synced: 12 days ago
JSON representation
A fully-hermetic Bazel GCC toolchain for Linux.
- Host: GitHub
- URL: https://github.com/f0rmiga/gcc-toolchain
- Owner: f0rmiga
- License: apache-2.0
- Created: 2022-03-15T21:56:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T21:21:26.000Z (6 months ago)
- Last Synced: 2024-05-29T01:35:42.468Z (5 months ago)
- Topics: aarch64, armv7, bazel, bazel-rules, c, cpp, fortran, gcc, linux, rbe, x86-64
- Language: Starlark
- Homepage:
- Size: 257 KB
- Stars: 93
- Watchers: 10
- Forks: 20
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-bazel - f0rmiga/gcc-toolchain - A fully-hermetic Bazel GCC toolchain for Linux (Tooling / Toolchains)
README
# Bazel GCC toolchain
This is a fully-hermetic Bazel GCC toolchain for Linux. It supports the glibc variants of
https://toolchains.bootlin.com. You can find the documentation under [docs](./docs/).## Why would someone want or need a hermetic toolchain?
Reproducibility and portability.
Developers want their code to compile correctly, be reproducible on CI systems and other developers
machines. The way C++ toolchains function usually rely on the system libraries to work.### Reproducibility
If you don't have the exact same headers and libraries, the output produced by Bazel will differ
from systems. This is particularly expensive with C++ as caches cannot be shared between machines.
More importantly, bugs may exist in one machine but not in others, making the development lifecycle
and build system unreliable.### Portability
When it comes to building portable ELF binaries, the libc plays an important role. The linker will
try to link against new symbols, and since the GNU libc has symbol versioning, linking against a
newer glibc will prevent that program from running on a system using an older glibc. To solve this,
we ship glibc 2.26 with the sysroots, which should be old enough by now to make all programs
compiled with this toolchain portable.### Use cases
* Your repository contains first-party C/C++/Fortran code; or
* You need to run sanitizers (asan, lsan, tsan, ubsan) on your code; or
* You need to cross-compile from Linux x86_64 to Linux armv7 or aarch64; or
* You want to make your program portable to other Linux distros (our default sysroot ships with
glibc 2.26); or
* You want reproducibility.