8 ms·
I'm still waiting for this bug to be fixed: https://community.amd.com/message/2796982 https://community.amd.com/message/2796982 Note: this isn't a bug in gcc,
by shmerl 9y ago
I'm still waiting for this bug to be fixed: https://community.amd.com/message/2796982 https://community.amd.com/message/2796982
Note: this isn't a bug in gcc, but looks like hardware bug related to hyperthreading.
- Laforet 9y agoI am still waiting the official errata for Family 17h
- InTheArena 9y agoJust a question (this is how out of touch I am). I thought most linux compilation moved over to a lvvm toolchain?
- shmerl 9y agoNot really, but it's generally up to individual projects. Many support both gcc and clang.
- unmole 9y agoNot even remotely close. No major distribution uses the LLVM toolchain.
- shmerl 9y agoIf you are talking about the kernel itself, I think Debian did some work to support building Linux with clang. But last time I checked, it wasn't ready. See also: https://wiki.debian.org/llvm-clang https://wiki.debian.org/llvm-clang
- cyphar 9y agoDistributions compile more than just a kernel. That's just one of several thousand packages we build. Usually the problem (even with something as simple as PIC/ASLR) is that old projects might have problems compiling. We just switched openSUSE Tumbleweed to GCC7 a few months ago, and it was a very large amount of work. I can't imagine how much work it would take to switch to LLVM.
- DannyBee 9y agoCounterpoint: We compile more than one entire linux distribution (one is gentoo based, others vary) with llvm with essentially no issues (the number of local patches is incredibly small, and most is actually just buggy code that clang happens to detect, and we are waiting for upstream to accept). Is it work? Sure. But it's not like "years of real work". It's about 5-10 people for a quarter or two.
- cyphar 9y agoIt is definitely possible, but I was saying that switching to LLVM would take a while, and that even GCC updates are painful. 5-10 people for 6 months is a fairly serious time investment for a community project (especially since we have a lot of other things on our plate).
- ktta 9y agoThere are efforts for the kernel itself too. http://llvm.linuxfoundation.org/index.php/Main_Page http://llvm.linuxfoundation.org/index.php/Main_Page
- cesarb 9y agoIn my experience, most Linux compilation still uses gcc. For instance, Fedora often recompiles all of its packages with a newer gcc for new Fedora releases; see https://fedoraproject.org/wiki/Changes/GCC7 https://fedoraproject.org/wiki/Changes/GCC7 and https://fedoraproject.org/wiki/Changes/GCC6 https://fedoraproject.org/wiki/Changes/GCC6 and so on. And the Linux kernel, due to its heavy use of gcc-specific extensions, also has some problems compiling with LLVM; see https://bugs.llvm.org/show_bug.cgi?id=4068 https://bugs.llvm.org/show_bug.cgi?id=4068 for a list.
- DannyBee 9y agoActually, these days, it compiles just about fine. (though admittedly it depends on the platform)
- fegu 9y agoFreeBSD has moved to llvm.
- bch 9y agoNetBSD also supports clang/llvm. https://wiki.netbsd.org/tutorials/pkgsrc/clang/ https://wiki.netbsd.org/tutorials/pkgsrc/clang/
- oblio 9y agoFor the base system or for everything? I doubt they moved the ports to compiling to LLVM.
- lmm 9y agoIt's the default for anything. Many ports override that and specify gcc (but that was already the case in a lot of cases where they needed a newer version than what shipped in the base system).
- bluGill 9y agoStarting FreeBSD 10 (released in 2014) the default for everything including ports was to build with clang. There was a large effort leading up to that to get as many ports as possible building with clang. Many bugs in clang were fixed, and patches were submitted upstream to make others work. At this time that effort is dead: the few ports that don't build with clang are accepted as doing something that will never work.
- loeg 9y agoFor compiler for base and most of ports, yes. The linker is still an ancient GPL2 GNU binutils one.
- floatboth 9y agoA lot of work happened on linking base with LLVM's LLD, I think it might be already used in -CURRENT for amd64 and arm64.
- stusmall 9y agoTo add to what other people have said, you can't even compile the kernel unpatched with llvm yet. GCC is still very much a thing.
- brianwawok 9y agoWhat would be the benefit to llvm?
- simcop2387 9y agomore portability, and some of the santiziers that clang has (ubsan, asan). They have gcc equivalents or ports but being able to use more of these kinds of tools is a good thing in the end since it'll allow more bugs to be found without an exploit.
- nullc 9y ago> and some of the santiziers that clang has (ubsan, asan) GCC has these.
- simcop2387 9y agoDo they end up finding the same issues/bugs? I thought they didn't always find the same things last I tried using them, so I'd build in both compilers to end up running tests/checks.
- CJefferson 9y agoNo sure what you mean by 'more portability'. gcc compiles to a strict subset of the architectures than llvm supports (at least, last time I checked).
- JohnStrange 9y agoYou mean superset, right?
- jhasse 9y agoTurns out that after Clang got all the features GCC already had, compile times where even worse. At least for my C++ programs compiling with g++ is faster than with clang++.
- e12e 9y agoWhy would you want to switch to llvm from gcc for a GNU/Linux distribution? (I mean, beyond proving that the code is portable and do regression testing)? I do remember talk on and off about shifting to the Intel c compiler, for increased performance - apparently Intel now has their own distro: https://clearlinux.org/ https://clearlinux.org/
- deleted 9y ago[deleted]
- musha68k 9y agoAMD fanboy checking in :) One of the good OCaml folks over at Jane Street just recently found a bug that crashes systems with Hyperthreading enabled on both Intel Skylake and Kaby Lake as well – just saying: https://news.ycombinator.com/item?id=14630183 https://news.ycombinator.com/item?id=14630183 Those hardware bugs are all very disheartening from software folks perspective, doesn't matter which company it pertains... "microcode update" rollseyes Edit: dear AMD haters, keep the downvotes coming B-) it has only been since May that the first fixes have been rolled out for Skylake / Kaby Lake – and yes, naturally AMD should "fix" (rollseyesagain) their respective issues ASAP but just saying... https://arstechnica.com/information-technology/2017/06/skylake-kaby-lake-chips-have-a-crash-bug-with-hyperthreading-enabled/ https://arstechnica.com/information-technology/2017/06/skyla...
- ivank 9y agoCompare what you can get today: an Intel CPU without a hyperthreading problem (fixed in a microcode update months back) or an AMD CPU with a hyperthreading problem (being investigated by AMD for 3 months). Edit: thanks, s/unacknowledged/being investigated/
- vvanders 9y agoIf I remember the story right it took Intel ~8months to accept that it was an issue and fix it.
- ivank 9y agoWould you buy a pile of Ryzen CPUs under the assumption that AMD will be able to fix it properly with an update (without e.g. disabling HT or making performance worse as they did for their TLB fix in 2007)? If they take another 2 months, you're out on your return window.
- blattimwind 9y agoThat bug was acknowledged a while ago.
- 9y ago