It'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.
"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."
Within 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.
>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.
It doesn't increase the number of macOS kernels, or decrease the number of Linux servers (including virtualized ones, which seems fair), so I doubt it tips the balance.
All I'm saying is that, because of servers, there are more GCC'ed Linux kernels than there are Clang'ed macOS kernels, and this will probably remain true indefinitely.
If AWS starts Clangin' on their Linux kernels, then maybe not. The trend toward Clang is pretty clear at this point; could happen.
Fair point. Google is close to shipping clang built Linux kernels in their data centers (usable VM images for external users already are), but Amazon and Microsoft both have very large clouds as well. I'd guess it's still way less than mobile devices, but I don't have a good sense for how the numbers compare in terms of number of devices in existence for mobile va cloud.
> 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."
Except 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.
Apple 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.
FreeBSD 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?
10.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.
> 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.
What's missing for sparc64 in Clang? We have Clang on sparc64 in Debian Ports.
My memory here is fuzzy because I'm very much not interested in Sparc, but, as far as technical shortcomings: there are integrated-assembler (ias) pieces missing; ld.lld support is extremely incomplete; it's missing a working stack unwinder. If you look for Sparc work in Clang upstream, it becomes obvious that it's not active.
The biggest thing missing was interest (and associated time and resources). People have had 6-12 months to step up if they wanted to work on moving platforms off of GCC4.2.1, and unlike for every other tier 2-3 arch formerly on GCC, no one showed up to work on Sparc.
> We have Clang on sparc64 in Debian Ports.
As in you can compile Clang on sparc (using GCC / binutils as the system compiler), or as in you can actually build Debian for sparc64 using Clang?
powerpc64 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.
This is specifically w.r.t. FreeBSD -- nobody put in the effort to maintain it, so it's removed in head/ as of now. As far as I'm aware, no one had tested sparc64/llvm on FreeBSD either.
We 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.
As 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.
I 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.
What 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.
Why does good things coming from another license mean GPL isn't working? GPL guarantees a lot of rights that an important minority of developers finds valuable . If you don't care for it, Im not here to convince you, but I think you should be glad it at least exists.
You are right -- the GPL has been enormously important to the free software movement. I (perhaps wrongly) interpreted your post as being anti-permissive more than pro-copyleft. My apologies!
The existence of LLVM means that GCC's GPL can't really guarantee anything anymore. 20 years ago we got an open-source objective-C compiler because its implementers wanted to reuse GCC's backend. But today a company in the same situation would just use the LLVM backend.
And that, along with FSF's earlier refusal to accept patches to let gcc build for the Mac, may be the reason LLVM got the support it did. Two egotistical jerks butt heads, and then one of them found a billion dollars at his fingertips.
So the reason for that was that Apple was of the legal opinion that GPLed software was incompatible with their OS.
Since they didn't have process boundaries at the time, all code running on the system, even the OS was basically linked together in a big blob. Apple thought (incorrectly) that allowing any GPL software would mean that they had to GPL their OS, and were vehemently anti free software.
I think under those conditions, the FSF's boycott was fair.
Do you have any source for that? I found a post[0] on Slashdot from March 2000 that Apple "plans to assign the copyright for its changes to gcc to the [FSF]." Neither the post nor the comments I skimmed seem to make reference to a victorious GPL lawsuit. (Unfortunately the original mailing list post is lost.)
The earliest snapshot[1] of opensource.apple.com on the Internet Archive suggests that the compiler sources were available (under "cc") as of October 12, 2000.
Although that snapshot suggests the first release was version cc-792, I can't find older than cc-798 on the site today. But the NOTES file[2] is interesting, detailing NeXT's/Apple's earlier changes including release codenames. (3/19/97: "This is the first fully functional compiler for the PowerPC.")
I would guess that the earliest Apple shipped gcc was with ProjectBuilder in the Mac OS X Developer Preview which was in 1999. Maybe things start to get blurry with NeXT, WebObjects, etc. but it doesn't _seem_ like Apple was shirking it's responsibilities under the GPL.
Ok, so I misremembered, it didn't get to the point of a full lawsuit, only lawyers sending increasingly nasty notes at eachother, but it's still the first GPL enforcement action.
Its was NextStep. They tried for a long time to ship a proprietary GCC, then a proprietary frontend with the rest of gcc, then finally backed down and released the frontend. This was all in the early nineties.
I see. I was just using Nvidia’s CUDA compiler and it seems to be similar—-a combination of a proprietary frontend based on EDG and gcc to produce actual binaries.
If GCC had been more permissively licensed then Apple would not have released its Objective C compiler, which would have been a worse situation for everyone involved (to include Apple: they are simply wrong that a proprietary compiler is better for them).
GPL tries to make the world better, by increasing the free software commons. BSD tries to be neutral, but one should not be neutral in a war of good vs. evil: (cf. Ireland, Spain, Sweden & Switzerland in the Second World War or Sweden during the Cold War).
No it's essentially saying if projects like GCC published permissively we could all get along peacefully and wouldn't need to batter each other using the courts.
LLVM recently re-licensed to the Apache License (v2) which explicitly provides relevant patent grants on contributed works to consumers of the software.
The issue there is it removes freedoms from your end users. Now there's a multitude of binary distributions of LLVM, and users can't mix and match pieces of them.
I've just seen it repeated several times, in many spaces. Apache, for example, moved faster after Nginx started taking market share. And ideas were copied back and forth.
Also, a monoculture isn't great for security/exploits.
Clang 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.
Is there some tipping point where gcc has too few significant end users to stay relevant? I'd hate to lose the diversity.