When can glibc be built with Clang?
21–30 of 30 posts
Re: When can glibc be built with Clang?
#22Earlier quoted context omitted.
GCC with max optimization still generally produces faster binaries than clang, but clang is constantly improving and in a few years they will probably be very similar.
That's why they said since 5 years. My experience was that clang seems longer compiling but due to the fact i did not compiled the same program with clang and gcc i would not take it as a rule.
Re: When can glibc be built with Clang?
#23Earlier quoted context omitted.
I looked and didn't see any answer to... is there a difference in performance of the gcc vs llvm compiled kernel?
They're different compilers so I assume the answer would be yes. If it isn't possible to build currently I expect minimal clarifying changes wouldn't have much impact on runtime performance (where it compiled previously), but as mentioned in another post would lower the risk of bugs and maintenance burden with clearer code. Portability, validation, across multiple platforms is one way of exposing bugs and weaknesses…
They have highly similar designs (at least in the middle-end which is the important part), or did, but gcc's remaining large customers care most about optimizations so it's still somewhat ahead there.
Re: When can glibc be built with Clang?
#24Earlier quoted context omitted.
> Similarly, the bundled `cc`s with classic Unices (if they were provided at all It has been a generation since it was common for people to pay for Unix, and then pay more for shitty developer tools. That gcc has gone from savior to legacy in that time is a huge testament to the value the open source world has created. But I think people forget the bad old days pretty quickly.
HP-UX, Aix, Solaris and mainframes POSIX environments are still around. Additionally, embedded also has plenty of POSIX like OSes that arent' Linux based.
Re: When can glibc be built with Clang?
#25Glibc has always been a whole rigamarole of nasty GCC-isms. I've been interested in building entire GNU/Linux systems with Clang for years, but I have always found a general lack of interest from both maintainers and the community. It's nice to see that finally something is moving, especially now that Linux is also finally buildable with LLVM.
Re: When can glibc be built with Clang?
#26Earlier quoted context omitted.
A lot of the GNU tools have had dependencies on GNU-specific versions of classic tools because, for decades, the non-GNU versions sucked . Lots of hard-coded arbitrary limits (line lengths, file sizes, command line option counts), quadratic behaviours, crashes, weird corner cases. Edit - also, lack of updates. POSIX added a new feature to a tool 5 years ago? Well, the built-in tool that came with your classic Unix pr…
> Similarly, the bundled `cc`s with classic Unices (if they were provided at all It has been a generation since it was common for people to pay for Unix, and then pay more for shitty developer tools. That gcc has gone from savior to legacy in that time is a huge testament to the value the open source world has created. But I think people forget the bad old days pretty quickly.
Re: When can glibc be built with Clang?
#27Earlier quoted context omitted.
A lot of the GNU tools have had dependencies on GNU-specific versions of classic tools because, for decades, the non-GNU versions sucked . Lots of hard-coded arbitrary limits (line lengths, file sizes, command line option counts), quadratic behaviours, crashes, weird corner cases. Edit - also, lack of updates. POSIX added a new feature to a tool 5 years ago? Well, the built-in tool that came with your classic Unix pr…
> Similarly, the bundled `cc`s with classic Unices (if they were provided at all It has been a generation since it was common for people to pay for Unix, and then pay more for shitty developer tools. That gcc has gone from savior to legacy in that time is a huge testament to the value the open source world has created. But I think people forget the bad old days pretty quickly.
I hope GNU can turn itself around, but because having n+1 competing FOSS implementations is a huge boost. I just fear it is not a sustainable situation.
libgccjit and the new rust backend is a good sign.
Re: When can glibc be built with Clang?
#28Earlier quoted context omitted.
> Similarly, the bundled `cc`s with classic Unices (if they were provided at all It has been a generation since it was common for people to pay for Unix, and then pay more for shitty developer tools. That gcc has gone from savior to legacy in that time is a huge testament to the value the open source world has created. But I think people forget the bad old days pretty quickly.
> That gcc has gone from savior to legacy in that time is a huge testament to the value the open source world has created I hope GNU can turn itself around, but because having n+1 competing FOSS implementations is a huge boost. I just fear it is not a sustainable situation. libgccjit and the new rust backend is a good sign.
Re: When can glibc be built with Clang?
#29Earlier quoted context omitted.
> That gcc has gone from savior to legacy in that time is a huge testament to the value the open source world has created I hope GNU can turn itself around, but because having n+1 competing FOSS implementations is a huge boost. I just fear it is not a sustainable situation. libgccjit and the new rust backend is a good sign.
That's exactly an illustration that a few competitors is unhealthy for the ecosystem, and llvm isn't going to evolve as fast as it did.
Re: When can glibc be built with Clang?
#30Earlier quoted context omitted.
Is that still true though? It was definitely the case some 5-10 years ago, but last time I checked they were pretty comparable, losing some, winning others.
clang wins on some benchmarks, but gcc wins on over 50% of benchmarks, at least this always seems to be the case whenever I look it up. If I were writing a program that needed to be really fast I would just compile with both on max optimizations and pick whichever was best. Most software isn't the linux kernel and will work fine with both compilers
For instance, GCC is by far the dominant compiler on GNU/Linux on x86, while LLVM has a almost total monopoly of AArch64 (think about Android NDK + iOS + macOS). I think it would be quite natural for the GCC AArch64 backend to get less focus compared to its x86 counterpart. It's a complicated landscape that is always full of gotchas, and that's why I don't like these kinds of benchmarks a lot.