News for hackers. Stuff that matters.
Re:OpenMandriva, the first Clang-built Linux distribution by otabdeveloper2 on Sunday June 16, 2019 @11:49AM (#20196056)
It's not great news. GCC is basically better in every way.

People promote Clang because it has a permissive license and opens the door for Google and Apple to inject proprietary crap into Linux.

Re:OpenMandriva, the first Clang-built Linux distribution by justinclift on Sunday June 16, 2019 @12:17PM (#20196233)
Does GCC have a decent WebAssembly backend?

Looking around just now, there's what seems like an initial experiment from someone, but it doesn't seem to have gone anywhere. :(

https://sourceware.org/ml/binutils/2017-03/msg00044.html

Asking because with the LLVM 8.0.0 release (a few months ago) it's one of the standard supported architectures.

Re:OpenMandriva, the first Clang-built Linux distribution by rurban on Sunday June 16, 2019 @02:03PM (#20196911)
No, GCC has serious shortcomings in certain areas. -flto=thin is better, autofdo/bolt is better, the jit is better, but the most important point are C constexpr which are implemented as in C++, but with GCC you cannot decide at compile-time if a constexpr is constant, so it misses out on many optimizations. It only has _Static_assert, but no usable __builtin_constant_p. With GCC it errors at compile-time, with clang it returns 0. clang also has diagnose_if, e.g. to match user-defined compile-time warnings with user-defined run-time warnings.

e.g. the clang memcpy can be 100x faster than the gcc memcpy, when the size and alignment is known.

And gcc-9 added serious regressions on some platforms, that you need to blacklist it. gcc-10 probably not being better.

Re:OpenMandriva, the first Clang-built Linux distribution by BurningCycles on Monday June 17, 2019 @04:41AM (#20201023)
I have to disagree, -flto=thin is faster in compile time, but in performance I get better results with -flto=n in GCC.

Also with FDO I get better results with GCC over Clang/LLVM, my main test subjects are rendering (Blender), archivers, encoders and emulation.

However with straight up -O2/-O3 I very often get better performance with Clang/LLVM. I haven't benchmarked on ARM though, my results may be very different there.

Re:OpenMandriva, the first Clang-built Linux distribution by astrange on Sunday June 16, 2019 @07:55PM (#20198699)
Where do clang and gcc implement memcpy? That's part of the C library.
Re:OpenMandriva, the first Clang-built Linux distribution by viraptor on Sunday June 16, 2019 @01:48PM (#20196834)
> opens the door for Google and Apple to inject proprietary crap into Linux

This doesn't make sense. You can compile proprietary code with gcc without problems already. Clang doesn't enable anything new here.