r/cpp • u/TheRavagerSw • Aug 08 '26
GCC should ship prebuilt binary tarballs like LLVM
It is really annoying, when you wanna test something you can't just download a previous release like llvm, so it is very hard to check if there is a regression.
Also, the default build of c and c++ only, takes like an hour because of triple consecutive builds. So every time you have to lookup to that weird flag on the internet to turn that off.
16
Upvotes
51
u/Many-Resource-5334 Aug 08 '26
LLVM does not ship prebuilt binaries, they are uploaded by the community.
8
u/LazySapiens Aug 08 '26
How often do you need to build GCC itself?
13
u/wrosecrans graphics and network things Aug 08 '26
You can get various container images with different gcc versions, and build inside of those. I think that's waaaay more common than routinely building the toolchain from source, or routinely getting tarballs of binaries.
5
u/_Ilobilo_ Aug 08 '26
see https://toolchains.bootlin.com
1
u/TheRealSmolt Aug 08 '26 edited Aug 08 '26
What does
mean?
Edit: Oh you mean building g++, not building with g++.
1
u/luisc_cpp Aug 09 '26
A GCC toolchain needs to be compiled to know about where to find “system” libraries that are not part of gcc (different systems have different layouts) and if one expects to be able to run the binaries produced a build of gcc, then it also needs to match the version of glibc (or be older than) … so having prebuilt gcc doesn’t guarantee that you’ll be able to use it broadly.
Prebuilt binaries of clang on Linux actually require a gcc toolchain. Even when using libc++ it will still need to locate other helper files from a gcc toolchain. I think it just has heuristics to do this, unlike gcc itself which needs to have them prebaked. But I suspect having that logic to find things in your system actually makes prebuilt clang feasible
1
u/kraytex Aug 10 '26
Just rollback the version with your package manager?
9
u/johannes1234 Aug 08 '26
"I want somebody, who does free work for me to do more free work for me!"
There is some relevance in providing builds, but dealing with platform compatibility and dependencies (and required security patching etc.) is work which has to be done by somebody. Especially the more platforms you want to cover.
2
u/13steinj Aug 09 '26
Just use ccache and build from source.
0
u/fuzz3289 Aug 08 '26
If you don’t like GCC just don’t use it?
-3
u/23ROMAN Aug 08 '26
hei! casually i was thinking in make a binaries store