Point of order: removed GCC /from the base system/. Ports still have a range of GCCs and some ports still depend on GCC. The GCC in base was well over a decade old, and it was that particular version for the same reason macOS shipped an ancient version of bash for a decade: it was the last one licensed under GPLv2.
This is effectively an administrative change. (Not to downplay the work!)
The title is highly misleading. First, it's the ancient GCC 4.2.1 from 2007. Next, it's removed from the FreeBSD build system, which means it's no longer used in the internal development of FreeBSD and you can no longer build FreeBSD with GCC. Meanwhile, GCC is still maintained for userspace and the latest GCC 9 is included in the FreeBSD Port [0], you can install it on your machine for your personal use. Finally, the commit message said "At this time all
supported architectures either use in-tree Clang, or rely on external toolchain (i.e., a contemporary GCC version from ports)", so I assume even with GCC support removed, you can still build FreeBSD, if you insist, with an external copy of modern GCC.
Suggested alternative title: FreeBSD has Removed GCC from Build Infrastructure.
OP here. I assumed knowledge of how FreeBSD works and the ongoing efforts to move to clang. I can see how the title could be misleading for people who are not familiar.
As others have pointed out "FreeBSD has removed GCC from the. base system" would be a better title.
I disagree, for anybody who knows how FreeBSD works the title is perfectly clear IMO. They removed FreeBSD from the base system. Of course you can still build GCC from ports, but that's not part of the base OS.
It's as if MacOS decided to stop shipping bash by default. Of course you'll still be able to install it yourself, but it's not part of the OS anymore and you can't rely on it being available and supported.
FreeBSD is not Linux, it's a full OS, not just a kernel. There's a very clear line between what's part of the base system and what's not.
People are here obtusely misunderstanding more than just how FreeBSD works.
Imagine this:
"Microsoft has removed Notepad from Windows!"
"You dummy, no it hasn't; you can still get a Notepad for Windows from the Microsoft Store! Microsoft only removed it from the base installation of Windows, not from Windows as such."
Doh? If that happened, you would no longer be able to rely on any installation of Windows to have Notepad.
Perhaps, but then the distinction between the base system and ports will be lost on them too, and saying that it's merely been removed from the build system doesn't do this news justice IMO, it's more significant than that.
Maybe we could compromise with "FreeBSD has removed GCC from its base system" or something similar.
The thing is that it is not significant news, except perhaps to FreeBSD base developers. It does not signify anything really, certainly not all of the things that people are reading into it even in this very discussion. It's not the death knell of GCC. It's not some sort of war. It has no impact on FreeBSD users, or on people building applications on FreeBSD. It's not even much of a change, considering that the actual concrete change, switching compilers, happened a while ago.
> The thing is that it is not significant news, except perhaps to FreeBSD base developers
I think it's significant news, and I have no connection to FreeBSD. It's a significant milestone for Clang, which makes it significant news to C programmers.
> It's not some sort of war.
Well, these compilers are competing with each other. It's a bit like the browser war, such as it is. If there were a respectable BSD-licensed browser, I'm sure the various FreeBSD-on-desktop distros would favour it.
> It's not even much of a change, considering that the actual concrete change, switching compilers, happened a while ago.
As a nail in the coffin moment I'd say it's still significant.
I'm a relatively new FreeBSD user, in fact I'm writing this on a Thinkpad running FreeBSD right now. The title is still super misleading, I had no clue that it was talking about the build infrastructure from the title alone - instead, I was expecting that my next version upgrade would remove GCC compatibility. Learning the FreeBSD philosophy doesn't change the fact that the title is inaccurate and unhelpful.
Yes, your next upgrade will remove GCC from the base system, not just from the "build infrastructure". However, you can still install the GCC port, as before.
With a tiny caveat: most folks actually won't feel this, because GCC hasn't been included in any x86 installed base system for quite a while now. Most exposure to it for many users would have been if they were cross-building archs that still required it, as the build infrastructure would bootstrap an appropriate GCC4.2 at that time.
I think you misunderstood what I was saying - I was expecting that this post would mean that GCC would stop working, or no longer be available, for me as a user. The point is that even for a FreeBSD user - albeit a new one - the title here is unclear on what "removed GCC" means.
But FreeBSD doesn’t control what software works on FreeBSD, that is up to the individual software maintainers. What you are describing would be “GCC has removed support for FreeBSD.”
I just learned something useful! There might be more crud in BSD, better avoid. The fact they only now remove gcc-4.2 as the base of their system has told me more than enough, thanks, but no thanks.
The title does not say "FreeBSD has removed GCC from the base system". It says "FreeBSD has removed GCC", full stop. Ports are also managed by the FreeBSD project, as I'm sure you'll agree.
I've ran every major BSD as a desktop OS and my first read was "what?! I knew Clang was getting good at pretending to be GCC nowadays but there's no way they've thrown it out of ports, right?!". And indeed, they haven't, but not because I read the title correctly.
> It's as if MacOS decided to stop shipping bash by default.
More precisely, it’s as if macOS stopped shipping GCC in the CLT.
Oh wait, they did exactly that already, the last one being gcc 4.2 on Darwin 11, after that a GCC command is still present but it’s just a front to llvm.
> and you can’t rely on it being available and supported
Is there a reason that you’d be relying on what’s included in the FreeBSD base system? If I were building a piece of software and developing a FreeBSD target for it, I’d probably just write a port manifest for it and contribute it; and in so doing, I can have my port manifest declare a dependency on the GCC port.
Just like if I create an Ubuntu PPA, I can depend on Ubuntu system packages, or even other people’s PPAs. (And it’s even less arduous than the Ubuntu PPA case, because PPAs are all their own third-party package repos that you have to add, while Ports is one flat namespace. As long as it’s “in ports”, you can depend on it without asking the user to do the equivalent of `sudo apt-repository add ...`)
IT security where you just get what they think you should be using, and regular accounts don't have execution permissions on any user accessible file system.
Presumably we're talking, here, about relying on GCC as part of the build-process of a package or script you're trying to deploy to this system.
If you don't have execute permissions, then, well, you're not going to be "installing" any software in any practical sense—you might be able to compile sources or copy files around, but you can't make the resulting binaries executable. Nor are you going to be doing much software development, for the same reason.
So why, at that point, would you need a compiler to exist on the box? It'd be like having GCC in a busybox installation.
Though i dont know how FreeBSD works after reading the title my first guess was hah, so are they completely switching to clang or some other compiler. But i think maybe if the title read "FreeBSD would stop GCC support" or something would have made it more clear on the outset, may be thats what the he is referring to.
> so are they completely switching to clang or some other compiler.
Yes, they are -- your understanding was correct. The FreeBSD OS now exclusively builds with clang, and clang is also the compiler shipped with the system.
You can, of course, still install GCC, and many other packages, from the ports tree, but it is no longer part of the OS.
In fact for the vast majority of FreeBSD users (those on i386 or amd64), this happened years ago. Old GCC was kept in the tree for some Tier-2/Tier-3 archs (like MIPS), and is now removed because it's no longer used for those.
> [...] so I assume even with GCC support removed, you can still build FreeBSD, if you insist, with an external copy of modern GCC.
Indeed- "external toolchain" includes gcc6[0] and gcc9[1] ports that can be used specifically for building the FreeBSD base system. These are mostly easy to use, install the flavor for whatever architecture you're building and specify CROSS_TOOLCHAIN=<arch>-gcc6 when you build. More/better/complete information (and examples!) at [2].
lapack, for example, has USES=fortran[1]. That invokes Uses/fortran.mk[2] and accepts the ports-default fortran compiler, FORTRAN_DEFAULT, which is definedin bsd.default-versions.mk[3] as gfortran (GCC).
Nothing changes here- this is solely about removing GCC 4.2 from the base/ repository; ports are almost entirely unaffected, and the GCC ecosystem in ports is fairly healthy.
It was entirely removed from the operating system. As with most general-purpose operating systems, nothing prevents FreeBSD users from installing third-party software, including GCC. This does not mean that GCC is still part of the OS.
There are many ways to install third-party software. Some are harder: download source and build from it yourself (while handling any cross-platform issues, etc). Some are easier: just install from an OS supplied package. The latter still works for GCC on FreeBSD.
I'd argue that the software provided via the ports is not part of the OS. But the FreeBSD ports themselves (and official packages built from them) can be considered part of FreeBSD.
P.S.
You can disagree with me and state your point, but you do not have to downvote me.
I don't know what to tell you. As someone who develops and uses FreeBSD, the title is true on its face and long-awaited. Yes, "from the base system as a supported base compiler" is implicit context here that someone outside of that community might not understand, but I think everyone familiar with FreeBSD can understand the headline, or failing that, the body of the (short) commit message and have a good understanding of the truth.
Depends on how you look at it. It's that particular old version of GCC in base because of licensing, yes -- but that old version is now effectively obsolete, so there's a technical reason (originally forced from licensing) to move away from it.
That said: it's good to remember how much of a breath of fresh air clang was way back when. Error messages in that era of GCC were _terrible_. Clang showed up with colorized error messages and ASCII art arrows and it felt like magic. So, sure, licensing alone would have been a fine reason for base to do what it did, but I don't think it's fair to characterize it as _just_ licensing. GCC has made huge improvements since then, but those are only visible in ports (which has always had and continues to have modern GCC). Which I guess you could argue makes it a licensing issue? :-)
I have recently set DECSCNM on in my terminal(s), which inverts everything, effectively swapping the foreground and background colours. The clang error messages now come out with unsightly large streaks of extraneous colour, as freshly erased lines caused by scrolling fill with the colour that clang has not yet turned off. clang was always doing this. But when it's the background colour it's more visible.
It would be such a simple fix, that's actually in line with code elsewhere in the same class. I wonder how many years it will take to get it changed.
> That said: it's good to remember how much of a breath of fresh air clang was way back when. Error messages in that era of GCC were _terrible_.
I disagree; I think clang set a trend and now GCC's error message are worse than they used to be. In the recent days I've seriously considered patching them out because I'm getting really tired of the wall of text of useless suggestions, macro expansion, etc. that hides the actual error. 99% of the time I just need to see which line my error originates from (before any macro expansion) and I can follow the chain manually in the remaining 1% of cases.
What's happening now is that I have a line with an error, and I get 50 lines of trash output among which the actual error is buried. And trying to jump to the error in my editor has me jump through headers, #include rows, and other garbage, sometimes missing the original error line entirely!
It's ridiculous. The suggestions are also largely either wrong or so obvious that they have only negative value. It's just clutter. Same goes for the ascii art arrows. Just clutter, making it harder to see relevant things.
I can see these messages being helpful for a total newbie who's still acquainting themselves with the standard library and figuring out the basics of the language, but for me (writing C daily for a living, and as a hobby for the past 15+ years) it's just getting in the way.
It's a pity that you weren't instead reminded of -fno-color-diagnostics, -fno-caret-diagnostics, and -fno-diagnostics-show-note-include-stack. You could have told clarry about them. (-:
IMO, still very much a licensing issue. Modern GPL3 GCC versions produce superior debuginfo as compared with Clang, in 2020, and the error messages and optimizations are currently competitive between the two. The ancient GPL2 GCC4.2.1 (C) compiled much faster than the modern Clang (C++), but I don't know if that still holds true for newer versions of GCC.
I have heard that the LLD (LLVM linker) is much faster than either ld.bfd or ld.gold.
In which way terrible? Error messages for C++ were at times unhelpful, but I can't remember being dissatisfied with those for C. Outside the Desktop environment, is there much C++ code in the FreeBSD system?
devd is C++, and it is not alone. Unfortunately, the dynamically-linkable C++ runtime library is in the wrong place, and not in the same place as the C runtime library, so things like devd have to be statically linked.
But the clang switch was not motivated by its C++ error messages, to my knowledge.
What is the problem of using a GPLv3 compiler? Only political reason, since FreeBSD is still an open source project and they can use GPLv3 software without any problem.
Not only that, but even proprietary software can be built with a GPL compiler, the binaries produced by the compiler are not considered derived work that must be covered by the same GPL license, so if Microsoft wanst to build Windows with GCC for example they can do that, provided that they don't link in the executable produced GPL code (e.g. glibc).
The legal subject of licensing GPLv3 is a lot more nuanced then you are indicating. One example of this is that while the license can explicitly allow proprietary software to link to a library it cannot explicitly deny proprietary software linking to a library. Copyright law defines what is and what isn't derivative works, not licenses. And copyright licenses are fundamentally limited to copyright law.
But there are technical reasons to avoid using GCC nowadays as well.
The GNU people have built in shitty anti-features into GCC suite, ostensibly to limit the ability of proprietary software to incorporate GCC into their products.
LLVM, which is what CLang uses, was partially a response to the artificial technical limitations intentionally imposed on users by the GNU GCC authors.
The main issue with GPLv3 software isn't the linking. You can link stuff using GCC without making sources available to anybody.
The main issue with GPLv3 is the so-called Tivoization clause. It basically states that if you have a product that ships with any GPLv3 software, you need to give your users the ability to install a modified version of anything you included that's GPLv3. Which basically means you can't lock down your device. That's a big security risk on an embedded system - both from an IP protection point of view, and also from a botnet/pwning point of view.
FreeBSD (and others presumably) don't want their users to need to worry about accidentally installing something from the core system and finding themselves in violation of the GPL.
>That's a big security risk on an embedded system - both from an IP protection point of view
If a company is interested in "protecting their IP" by closing the source then it's questionable why they would have even wanted to use GPLv2 software at all. The OEM's IP situation is also not related to the security of the customer. Maybe it matters to the security of the OEM, but that's different.
>and also from a botnet/pwning point of view
Complying with the GPLv3 doesn't mean the device becomes vulnerable to botnets. All it means is that the customer who purchased the device has to get access to the hardware keys. For their own device. That they purchased.
> If a company is interested in "protecting their IP" by closing the source then it's questionable why they would have even wanted to use GPLv2 software at all. That also is not related to the security of the customer at all. Maybe it matters to the security of the OEM, but that's different.
I can't speak for other engineers. But at companies I've worked in, a common product model is "embedded Linux with GPLv2 software, and some proprietary secret-sauce binaries". At those companies, they usually do send patches to upstream open-source projects and they try to contribute. Also they usually provide full source-code on request, for everything except the proprietary stuff.
The net effect of GPLv3 has been that GNU packages basically don't exist on embedded devices any more. Which means that engineers like me don't have the professional opportunity to contribute features and patches. It sort of isolates GPLv3 projects into a walled garden, which I feel like is the opposite of what GPL was intended to foster. Instead, I can only have the professional opportunity to contribute on GPLv2 or permissive-license projects.
> Complying with the GPLv3 doesn't mean the device becomes vulnerable to botnets. All it means is that the customer who purchased the device has to get access to the hardware keys. For their own device. That they purchased.
I sympathize with the intent behind this. There are also just some practical realities that are tough. At my current company, the team working on our next embedded Linux product is pretty small. We don't have infinite time or resources to make sure that our own code is 100% intrusion-resistant - all we can do is try our best.
It's a big ask for us to support _two_ methods of firmware-update (local and over-the-network) with different keys/security requirements for each. We just plain don't have the manpower to support that, not when we can be developing features to improve our product instead.
And if you have access to the filesystem, it's that much easier to comb through it and look for vulnerabilities in our network updater (for example). And it's easier to pick apart the proprietary bits with Ghidra or something. Could you do it anyways, even without our help? Maybe. But it's much harder.
Can we design a system that's robust enough to allow you to install whatever you want on your unit? Maybe. Probably. Hopefully we're already there. But I'm not going to risk my company's livelihood on it just to ship GPLv3 software, especially considering that there are almost-as-good alternatives for a lot of it. We just don't have the resources to make sure we cover every security angle on an open-box system.
We are in a bind here. If you ship GPLv2 software on a locked down device then nobody downstream has the professional opportunity to contribute, because they simply can't get any of their changes onto the device. The reason to rectify this is not "to ship GPLv3 software" the reason is because otherwise customers don't have control over their own devices.
The developers who relicensed to GPLv3 don't care that some companies won't contribute. From their perspective, any of those contributions would be unusable to them. I feel a similar way with my open source projects -- why would I as an outsider maintain code that nobody outside of your company will ever have any possible way to test in a real production scenario? It's a waste of my time. Yes I might be missing out on minor bug-fixes but I don't really care about that. Like you said, feature development is more important.
As far as firmware-updating goes, to be in compliance the user just needs to have some way to get access to the keys. You don't need to make separate keys, it can be the same method that you use.
> We are in a bind here. If you ship GPLv2 software on a locked down device then nobody downstream has the professional opportunity to contribute, because they simply can't get any of their changes onto the device.
I should clarify - what I meant is that if we're shipping GPLv2 software like Busybox, then I'm able to spend billable time improving Busybox and upstreaming my patches. That's labor that could be going to GNU coreutils instead, if it was the userspace on my product. But since I'm not shipping it, that means I don't find bugs or need features very often. Which means I have way less of an opportunity to pitch in.
That's great for you. In that situation, if my company buys your product, we have zero opportunity to pitch in to Busybox and are not able to spend any of our billable time upstreaming our patches, because the device is locked down. Who wins here? It's not the project who wins, because they lost contributions. It's not my company or any of your other customers who win, because we can't contribute. It's not you who wins, because if you get a different job then you lose access to the device and can't contribute, and you also lose the billable consulting hours that you could have charged to my company. It's not your company who wins, because they lose the shared contributions from my company.
I'm not making this up either. Even in my personal life I own lots of random devices that I know for a fact are running Linux and Busybox. But I have to go out of my way to find a device that I actually have a chance to get a toolchain running on and can actually start working on patches. It's usually limited to old devices that had no security or had their security broken. So any contributions I make are limited to things that only work on insecure old legacy hardware, stuff that is not going to be of interest to your company working on the next new hotness. There is a real problem here that's in-part solved by the GPLv3, but you have to actually acknowledge that it's a problem.
Just a note - I appreciate this discussion, and your point of view! Thanks for having it.
Ease of contribution is a problem for sure, and it's one that GPLv3 was intended to address. My main point is that the changes from GPLv2 actually had the opposite effect for a whole group of developers.
Instead of encouraging -more- development, I feel like maybe it's just driven developers away and onto GPLv2, MIT, or BSD equivalents. Maybe this is intended behavior, and not an accidental side-effect. I don't know. But it's hard to dispute that it reduces the pool of potential contributors to GPLv3 packages.
GPLv3 components just aren't an option for a lot of products, regardless of whether GPLv3 is better for users (I agree that it is). I think it's really harmed the FSF a lot. With fewer installations of FSF packages, the FSF sees less participation and loses some of its clout. And that makes me sad :(
People and groups that wanted to contribute but couldn't because of locked-down devices were already driven away and discouraged from development. And it was worse for them, if you own a locked-down device you can't go and decide to run FreeBSD on it to fix that. You just can't work on it at all. The GPLv3 was drafted in response to complaints about this -- specifically, companies that were shipping Linux and Busybox and were either straight-up GPL violating, or were telling users to get lost when they asked how it would be possible to get patched software on the device in any practical sense. From my perspective, there already was a wall in between those companies locking down their devices and the rest of the community. The GPLv3 only highlighted it.
> It's a big ask for us to support _two_ methods of firmware-update (local and over-the-network) with different keys/security requirements for each. We just plain don't have the manpower to support that, not when we can be developing features to improve our product instead.
But you don't have to do two different systems. You can use the exact same update mechanism, just with the cryptographic validation controlled by the owner of the hardware.
Look at how Secure Boot is implemented on most x86 platforms. Default installed keys from the OEM, can not be changed from the OS, but can be disabled or replaced by the end user.
Chromebooks offer another example of how to do it well with their "Developer Mode" switches. With the switch (which is not accessible on an operating system) in the default position it will only boot Google signed images. With the switch in developer mode it notifies the user of this on every boot, but no longer verifies signatures. The device is factory reset when switching modes to ensure that the unsigned mode can not be used to compromise a stolen device.
Android phones with unlockable bootloaders work similarly, they just have a software toggle in the first-stage bootloader rather than a physical switch.
---
There are plenty of low-effort ways to provide cryptographic verifiability to end users while still following not just the letter but the spirit of the GPL.
Obviously most of us would prefer something like the first example where a user could replace the stock keys with their own and sign their own code to maintain full security when going off on their own, the second and third options are nearly trivial to implement. One switch or jumper, a single input pin, and however much code it takes to check the state of that pin when performing any boot validation.
When ever people mention the Tivoization clause they forget to include the big exception which the license gives. You do not need to give your users the ability to install a modified version of GPLv3 software if there is no mechanism for which the manufacturer can modify the software after sale.
People can create any number of embedded system which are locked down so no one can change the software. The key here is nobody. Not the user, not the manufacturer, not some backdooring third party.
People are free to argue that allowing manufacturers access to devices after sale but not the actually owners is a security feature to prevent botnets and pwning, but that is a harder sell.
Don't write proprietary compilers. You can thank GCC for mostly eliminating that possibility in the years before clang. Now we are dealing with that again.
> Only political reason, since FreeBSD is still an open source project and they can use GPLv3 software without any problem.
And what about Dell EMC Isilon OneFS, which uses FreeBSD as the base of their product? Or Panasas or NetApp? Juniper? Sony and their PlayStation 4? Netflix?
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.
Yes, GCC 4.2.1 for tier 2 and 3 architectures only (like MIPS or PPC) for quite some time.
Clang/LLVM was imported into FreeBSD base in FreeBSD 9, released in 2012[1]. I don't believe it was the system compiler for any arch at that time, but could be wrong. In FreeBSD 10 (2014) it became the default compiler for amd64/i386[2].
Can anybody explain the hate/aversion towards GCC? As I see it clang used to generae more meaningful error messages thats why many people turned toward clang. But it seems those days are gone.
Gcc still produces better=faster machine code. So why the hate? Are there political reasons involved?
GCC is more spaghetti than Clang, less modular. But yeah, it's mostly political/business/legal related. A lot of people hate copyleft with a passion like Apple and Google, who hire lots of people to work on LLVM.
The idea seems to be that LLVM will eventually catch up to GCC on quality of generated code.
Google didn't move to clang/llvm because they hate copyleft. They moved because people who work on compilers prefer to work on clang/llvm, and if you have a compiler group you need to keep them happy.
It's probably also true that the FSF is more of a pain to work with than absolutely necessary — they want copyright assignment, have some abhorrent code style, and still insist on tracking useless diff summaries in ChangeLog files long after the invention of RCS systems.
Hate is probably too strong a word but there is a contingent within the BSD community who perceive the GPL as "viral" and actively work to make as much of the project BSD-licensed (or similar) as possible.
The main issue with GPLv3 is the so-called Tivoization clause. It basically states that if you have a product that ships with any GPLv3 software, you need to give your users the ability to install a modified version of anything you included that's GPLv3. Which basically means you can't lock down your device.
That's totally fine if you're talking about a workstation, laptop, or server. But it's a big security risk on an embedded system like a smart TV, mobile phone, or game console - both from an IP protection point of view, and also from a botnet/pwning point of view.
FreeBSD (and others presumably) don't want their users to need to worry about accidentally installing something from the core system and finding themselves in violation of the GPL.
That's a rationalization though, not the reason. FreeBSD's GPL "exorcism" efforts had been going on long before FSF started floating ideas about GPL 3.0.
Well from my understanding FreeBSD was using an old version of GCC mainly because licensing reasons. What's so annoying about the licensing around GCC is I see a lot cases where the code generation is still better than clang. Although clang matches GCC in most cases.
I guess we shouldn't be surprised. BSD has no philosophical reason to keep GCC over Clang, and if Clang is delivering better performance for them, obviously they're gonna use it.
Regardless of what the situation was back in 2007, one tends to imply the other over time: the version of GCC is ancient now (because of licensing issues) and of course clang will do better: it has an extra decade of compiler development.
In the future, gcc will be remembered (fondly!) as historically significant between the time periods of simple unix-based K&R C compilers of many years ago -- and Clang, of the past few recent years...
This is effectively an administrative change. (Not to downplay the work!)