8 ms·
I don't know the whole space well, but there are posts about FreeBSD and IBM today moving to clang. Is there some tipping point where gcc has too few significa
by tyingq 7y ago
I don't know the whole space well, but there are posts about FreeBSD and IBM today moving to clang.
Is there some tipping point where gcc has too few significant end users to stay relevant? I'd hate to lose the diversity.
- dannypgh 7y agoWe used to celebrate alternatives to gcc in the name of compiler diversity, and now we're wondering about gcc preservation in the name of compiler diversity. This is mostly just an observation, I'm not sure how I feel about it. Compiler diversity doesn't seem more important than OS diversity to me, and none of these feel particularly important. As a user I was happy to switch to clang for the better error messages.
- ComputerGuru 7y agoIt's unlikely as up until now it was the only compiler capable of building the Linux kernel (due to its reliance on some GCC extensions to the language). It is primarily non-GPL platforms/systems/companies that are switching to clang for it's much friendlier license. Edit: "~now" rather than "now"
- tyingq 7y agoThat's part of why I ask. As of late last year, clang can compile x86_64 Linux 5.x kernels.
- Someone 7y agoBuilding the kernel with clang has been possible or a while. https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html#linux-kernel https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNote...: "With support for asm goto, the mainline Linux kernel for x86_64 is now buildable (and bootable) with Clang 9. Other architectures that don’t require CONFIG_JUMP_LABEL=y such as arm, aarch64, ppc32, ppc64le, (and possibly mips) have been supported with older releases of Clang (Clang 4 was first used with aarch64). The Android and ChromeOS Linux distributions have moved to building their Linux kernels with Clang, and Google is currently testing Clang built kernels for their production Linux kernels." That was in September 2019
- ComputerGuru 7y agoYes, I consider within the past year to qualify as "now," but I've updated my post :)
- ndesaulniers 7y agoWithin the past year is more nuanced. Clang was building working kernels since clang-4. X86 developers decided to require asm goto around Linux 4.20, which regressed clang builds for one architecture, until clang-9 implemented it. You could still build LTS kernels without asm goto.
- marcthe12 7y agoClang can't compile glibc which actually a bigger problem.
- jsjddbbwj 7y agoIn my opinion it's also time to move on from glibc.
- fullstop 7y agoWithout clang we would still have terrible compile error messages. As clang implements more and more of GCC's extensions, though, I could see things reaching that tipping point.
- pjmlp 7y agoAnd without a GPL compiler, we will be back to the PD and *ware days. Sony, Apple, IBM, and plenty of other embedded vendors don't contribute 100% their improvements back to LLVM.
- loeg 7y agoApple does like 80% of the open source development of LLVM; I don't really see a valid angle to criticize their participation in LLVM at this time.
- pjmlp 7y agoExcept that they happen to have an actual portable variant of bitcode for watchOS, their clang implementation different enough from mainline clang to warrant its own column on cppreference compiler listing, and Objective-C and Swift related changes are on "just what you need to know" basis and the community should put the missing pieces. Personally I don't care, as I am mostly a commercial software user nowadays. Just making the point that LLVM victory over GCC, might not turn out as FOSS supporters expect.
- bigcheesegs 7y agoApple Clang gets its own column because it doesn't align with the official LLVM release schedule, which is also why it doesn't use the upstream version numbers.
- jfkebwjsbx 7y agoThat does not make sense. They could simply use the LLVM version, even if it was an old one.
- beezle 7y agoFreeBSD has been using Clang as the default build system for x86/64 since.. 2012? Version 10.0 IIRC. Not sure about mips, sparc, power but think they moved previously as well?
- kevans91 7y agopowerpc64 switched over in late December; sparc64 never made the switch (unfortunately), and mips will make the switch with the introduction of llvm 10. IIRC powerpc32 is currently using clang with old bfd ld, but lld in llvm 10 may be quickly reaching the point where it's suitable for powerpc32 as well.
- cbmuser 7y ago> sparc64 never made the switch (unfortunately) Care to elaborate? We're maintaining sparc64 in Debian Ports and we have smashed quite a number of bugs in the SPARC backend in LLVM. Are there any issues you are seeing?
- loeg 7y ago10.0, 2014 for amd64/i386. Much later for MIPS and Power (within the last year). Sparc was deorbited as part of the GCC4.2.1 retirement effort — no one showed up to implement Sparc support in Clang, and the version of Sparc hardware FreeBSD ran on was extremely obsolete anyway.
- Sean1708 7y agoAs other top-level posts have pointed out they're only removing it from the build process, it's still available to users. I wouldn't worry too much about about GCC going away, it's still the default compiler for most (all?) Linux distros.
- umanwizard 7y agoIt was removed from the operating system. As with most operating systems, nothing prevents users from installing third-party software including GCC.
- deleted 7y ago[deleted]
- bregma 7y agoClang would gave to start having better support for floating point. Right now it's at the "eh, whatever, it works for my limited case" level of support, which is not near good enough for safety-critical applications. They're starting work on that, so maybe in a few years time.
- umanwizard 7y agoDo you have a reference for this, out of curiosity?
- cat199 7y agoare you saying this in respect to GCC or in regards to commercial compilers, or both?
- lmm 7y agoWhat does that "diversity" actually gain you? LLVM is very modular so a clang monoculture won't stop competing optimisations etc. being developed, and its license is suitable for most uses.
- justinmeiners 7y ago- The GPL license for GCC is valuable for free software rights. - just like chrome becoming the only browser, one compiler isn't good either. The implementation starts to define the language instead of the standard - separate projects can use different methodologies and tradeoffs. - if there is a bug or exploit that only applies to that complier and not all programs I don't think we should have 20 major C++ compilers but we shouldn't have one.
- umanwizard 7y ago> The GPL license for GCC is valuable for free software rights Apparently not in practice, because LLVM's copyleft license hasn't stopped large amounts of free software from being created (for example, rustc).
- monocasa 7y agoThe ObjC frontend was only released because Apple got sued for infringing on the GPL.
- chrisseaton 7y agoFewer people suing each other seems better in my opinion.
- monocasa 7y agoHow about you comply with the terms of the licence if you don't want to be sued?
- umanwizard 7y agoGcc is still the default on GNU/Linux systems which are orders of magnitude more mainstream than FreeBSD.
- anthk 7y agoSo what? Clang under OSX compiling both OSX and iOS projects is far more widespread.
- samatman 7y agoOn computers-with-keyboards, maybe, probably even. On a per-kernel basis, absolutely not, even before we consider Androids.
- andoriyu 7y ago> The Android and ChromeOS Linux distributions have moved to building their Linux kernels with Clang, and Google is currently testing Clang built kernels for their production Linux kernels." https://en.wikipedia.org/wiki/List_of_products_based_on_FreeBSD https://en.wikipedia.org/wiki/List_of_products_based_on_Free... You have no idea how many places FreeBSD actually runs in.
- favorited 7y agoGoogle uses Clang to build the kernel for Android.
- samatman 7y agoWhich is interesting but hardly relevant. To quote: > > Gcc is still the default on GNU/Linux systems which are orders of magnitude more mainstream than FreeBSD. > So what? Clang under OSX compiling both OSX and iOS projects is far more widespread. I'm asserting that there are more Linux kernels compiled under GCC than there are OSX kernels running Clang (so macOS) compiling OSX and iOS projects. I think that's on pretty solid ground.
- ksec 7y ago>Is there some tipping point where gcc has too few significant end users to stay relevant? I'd hate to lose the diversity. Yes. There will be a tipping point, as with any economic theory of sustainability. No, we wont reach that tipping point in the foreseeable future. It is still extremely widely used, and continue to be actively developed. LLVM and GCC will likely enjoy duopoly in the Open Source Space for a very long time.
- ksangeelee 7y agoI don't think your question is meaningful in light of why GCC exists at all. It was created to enable people to write free software and, along with binutils, it's hard to imagine any software that's been so profoundly influential in the free and open source software that we have today. I think GCC will remain relevant for as long as there are people who care about free software.