News for hackers. Stuff that matters.
Re:NetBSD 11.0 by Narishma on Saturday August 01, 2026 @04:17PM (#49138009)
> gcc(1) - updated to 12.5.0.

Anyone know why they are still on such an old version? The latest version is 16.1.

Re:NetBSD 11.0 by spijdar on Saturday August 01, 2026 @05:04PM (#49138470)
It's almost certainly due to supporting platforms like VAX and other, more exotic ISAs. GCC can have weird regressions [0] in "less tested" architectures, so I presume they use a single, known good release across all platforms for consistency's sake.

[0] GCC still supports PDP-11, for example, but for a while modern GCC had some major codegen bugs. Last I checked, the maintainer had made heroic efforts to fixing the bugs, but that's just an example of where bitrot silently renders a target unusable.

Re:NetBSD 11.0 by washbear on Saturday August 01, 2026 @06:35PM (#49139192)
This is partly the reason, the other reason is that 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.
Re:NetBSD 11.0 by mghackerlady on Saturday August 01, 2026 @04:46PM (#49138315)
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
Re:NetBSD 11.0 by microtonal on Saturday August 01, 2026 @04:57PM (#49138415)
But the licensing didn't change between gcc 12 and gcc 16, so that doesn't seem like a good explanation?
Re:NetBSD 11.0 by PuercoPop on Saturday August 01, 2026 @06:10PM (#49138977)
It 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!

Re:NetBSD 11.0 by brynet on Saturday August 01, 2026 @10:27PM (#49140489)
> 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.

Re:NetBSD 11.0 by washbear on Saturday August 01, 2026 @06:37PM (#49139208)
This 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.

Re:NetBSD 11.0 by ranger_danger on Saturday August 01, 2026 @09:43PM (#49140261)
Why would the C code no longer compile if it conforms to the spec?
Re:NetBSD 11.0 by wasting_time on Sunday August 02, 2026 @12:01AM (#49140974)
You sort of answered your own question.

Another reason is compiling with -Werror and hitting new warnings.

Also, the version of the spec changes with almost every major release.

Re:NetBSD 11.0 by seabrookmx on Saturday August 01, 2026 @11:45PM (#49140889)
"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.
Re:NetBSD 11.0 by ranger_danger on Sunday August 02, 2026 @12:16PM (#49145864)
To me, undefined behavior is by default not conformant, so that wouldn't count for the purposes of my question.
Re:NetBSD 11.0 by stonogo on Saturday August 01, 2026 @11:46PM (#49140899)
There 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.
Re:NetBSD 11.0 by ranger_danger on Sunday August 02, 2026 @12:15PM (#49145851)
but if the correct standard is specified as an option, shouldn't that prevent conformant applications from failing to compile in newer versions?
Re:NetBSD 11.0 by stonogo on Sunday August 02, 2026 @09:11PM (#49150106)
Sure, that's one approach. Testing those changes takes time when you're working on a whole operating system and a ports tree. More time than cutting a new gcc release, as it turns out.
Re:NetBSD 11.0 by hulitu on Monday August 03, 2026 @12:42AM (#49151291)
> shouldn't that prevent

it should. It doesn't.

Re:NetBSD 11.0 by hulitu on Monday August 03, 2026 @12:41AM (#49151286)
Because, for some reason, someone at gcc decided that some warnings shall be treated as errors. Good luck finding out which those are and which flags you need as a countermeasure. Of course it has documentation. Of course it is useless.
Re:NetBSD 11.0 by hexagonwin on Saturday August 01, 2026 @04:58PM (#49138421)
wasn't that around gcc4 or something era? gcc12 is pretty new
Re:NetBSD 11.0 by brynet on Saturday August 01, 2026 @10:11PM (#49140420)
Indeed, 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

Re:NetBSD 11.0 by jmclnx on Saturday August 01, 2026 @05:09PM (#49138524)
gcc 15.1 is in pkgsrc 2026Q2:

gcc15-15.2.0nb1 - The GNU Compiler Collection (GCC) - 15.0 Release Series

As others said, I think it has to do with all the platforms NetBSD supports.