5 ms·
We need stable and free infrastructure. It is unfortunate how few people realize what GCC does for everyone. It certainly ain't perfect, but imagine we only had
by choeger 5y ago
We need stable and free infrastructure. It is unfortunate how few people realize what GCC does for everyone. It certainly ain't perfect, but imagine we only had clang/llvm. Llvm regularly breaks the API and cannot be bootstrapped, AFAIK. Without GCC, I doubt we had android, or capable cheap routers, the whole python and node.js ecosystems would be in a completely different situation, and we would permanently facing the threat of propiatary languages. I support rust in GCC, too (and I am glad that they also have Go support).
- TazeTSchnitzel 5y ago> LLVM […] cannot be bootstrapped How? Can't you compile it with GCC?
- choeger 5y agoIf I have GCC, I don't need llvm. Try to bootstrap llvm with something else.
- deleted 5y ago[deleted]
- pertymcpert 5y ago> Llvm regularly breaks the API As opposed to the stable GCC API? > cannot be bootstrapped Say what now?
- moonchild 5y ago> Llvm [...] stable GCC API In GCC, the compiler frontends are generally developed in parallel with, and distributed in parallel with the backend. There are some frontends which are distributed separately, but I expect that gcc-rs will be integrated into the mainline gcc source tree once complete. So it's not really an issue in practice. To put it another way: llvm api breakage doesn't affect clang, but it does affect other compilers using llvm. Gcc is like a BSD, while llvm is like linux (except that linux makes a commitment to compatibility which llvm does not).
- choeger 5y agoLlvm doesn't have a bootstrap target.
- pertymcpert 5y agoWhat do you mean a bootstrap target? What specifically does gcc provide that clang doesn't?
- choeger 5y agoGCC specifically has bootstrapping as a feature in the build system. They take care to document which older version of GCC is required to build a newer versions. If you pick a version that doesn't rely on C++ (4.x IIRC) you can compile GCC with a very small and general C compiler (tinycc or so). That helps to provide a chain of trust and also gives you access to a new platform if necessary. LLVM only offers cmake so you always need a (full-feature) C++ compiler to build it. That being said, GCC could make things better by providing a C-only entry point in modern releases, but it's still better than LLVM in that regard.
- pertymcpert 5y agoI don't understand. You could just cross compile LLVM onto a new platform from another host arch. You don't need to have a very long sequence of bootstrap builds, just directly jump.