Re: Earliest version of gcc the project should support as stage1 for gcc 17?
Christophe Lyon via Gcc <[email protected]>
| Newsgroups | gmane.comp.gcc.devel |
|---|---|
| Message-ID | <[email protected]> |
On 3/20/26 11:15, Jakub Jelinek via Gcc wrote: > On Fri, Mar 20, 2026 at 09:47:08AM +0000, Claudio Bantaloukas via Gcc wrote: >> Title says it all really. >> >> Why am I asking? I'd like to try writing a build that checks stage1 works >> with the earliest version of gcc the project wants to support. >> >> https://gcc.gnu.org/install/prerequisites.html currently says: >> - GCC 5.4 or newer has sufficient support for used C++14 features. >> - If you need to build an intermediate version of GCC in order to bootstrap >> current GCC, consider GCC 9.5 >> >> Should it use gcc 5.4? Is it time to increase that version? > > Yes. No. > > We don't increase the minimum requirement just for fun, but when it gives > significant benefits for the codebase and the earliest supported gcc is > still old enough (unlike especially rustc but also LLVM we try not to > require too recent stuff for building). > The reason to go to gcc 5.4 [1] (which already causes significant pain, several > CompilerFarm machines still have system gcc 4.8.5) was to be able to use > C++14 and so not be as limited in constexpr functions as in C++11. I believe Claudio is aiming at adding such builds in the forge CI (happy to help btw ;-) ), so I suppose a follow-up question is what distro & version should a container use? Claudio shared a list in his message, none of which matches the exact 5.4 requirement. Does this mean starting with an ubuntu-16.04 (ships gcc-5.3.1) and build/install gcc-5.4.0 in it, and use the resulting image? Thanks, Christophe > The next step would be to be able to use C++17 features (but which ones are > the ones we can't live without in the sources right now?), but that > would mean requiring GCC 9. That is IMHO quite premature. > We've switched to C++14 requirement in GCC 15 and between GCC 5 and 9 it > is 4 years, so I'd expect switching roughly in GCC 19 rather than GCC 17. > > [1] I think some 5.3.1 versions can be just fine too, depends on from when, > there were some important C++14 bugfixes between 5.3.0 and 5.4.0. > > Jakub >