3 ms·
They don't like GPLv3. The other BSDs used similarly old versions until they moved to clang, but netbsd is pretty tied to the gnu toolchain and aims to be as po
by mghackerlady 2mo ago
They don't like GPLv3. The other BSDs used similarly old versions until they moved to clang, but netbsd is pretty tied to the gnu toolchain and aims to be as portable as possible, so they kinda have to stick to gcc
- microtonal 2mo agoBut the licensing didn't change between gcc 12 and gcc 16, so that doesn't seem like a good explanation?
- PuercoPop 2mo agoIt is not a good explanation because that is not the reason. That reason is for Mac OS. I don't know the details, but BSDs normally modify the GCC version they use. IIRC OpenBSD used to use GCC 2.95 for years. Porting NetBSD base to compile with a newer GCC version is not as simple as a version bump. My guess is that they haven't prioritized that work yet. Patches welcome!
- brynet 2mo ago> IIRC OpenBSD used to use GCC 2.95 for years. 2.95.3 and 3.3.6, both have now been retired in favour of gcc4. The majority use clang now, though.
- hexagonwin 2mo agowasn't that around gcc4 or something era? gcc12 is pretty new
- brynet 2mo agoIndeed, 4.2.1 was the last GPLv2 version. OpenBSD still uses it (w/ patches) for a few platforms, for example. /bsd.own.mk:GCC4_ARCH=alpha hppa m88k sh sparc64 The rest have already been migrated to LLVM/Clang 22 by default (except sparc64 below, that's experimental). ./bsd.own.mk:CLANG_ARCH=aarch64 amd64 arm i386 mips64 powerpc powerpc64 riscv64 sparc64
- washbear 2mo agoThis is not the reason. We created this branch in July 2025 (GCC 12.5 was released on 11 July, 2025) and spent a year stabilizing it. A new system compiler is considered far too much of a risky, incompatible change to backport. Especially since lots of C code no longer compiles with GCC 14+ without significant changes. Each time we upgrade the system compiler, it requires extensive work to keep all of our supported architectures in working order, and adjust our code for compatibility.
- ranger_danger 2mo agoWhy would the C code no longer compile if it conforms to the spec?
- stonogo 2mo agoThere is more than one C specification, and with each new release of GCC several things that used to emit warnings are newly treated as errors.
- ranger_danger 2mo agobut if the correct standard is specified as an option, shouldn't that prevent conformant applications from failing to compile in newer versions?
- seabrookmx 2mo ago"The spec" is loose in places and is full of undefined behavior which can change from compiler to compiler. Very low level code tends to hit these types of issues much more than application code would. But these types of issues are even common in large userspace codebases.