I would like to make Haiku my main development platform for some of my projects, however I need a C++20 compliant compiler. There are other issues but the compiler is the main blocker. On Linux (SUSE Linux), I am currently using g++ version 10.2.1.
The latest version available in the HaikuDepot is g++ 8.3.0. I took a look at what may be needed to create a new g++ recipe/package and I think I can build something locally.
But what else is needed?
Does the current g++ recipe include the linker or is that separate?
What about the C++20 compliant headers?
Any help or links to information would be appreciated.
I have tried to bump the GCC recipe to 10.x, but the GCC 8 patches doesn’t applies cleanly anymore, some parts of it should be redone. I applied most of them manually, but then got an error message during compilation, that some variable were poisoned. Now i don’t know too much about the psyché of compilers, so i abandoned the ship.
Good luck, and if it is possible, create a GCC10 recipe and make a PR at HaikuPorts.
That’s excellent news. For my projects I’ve enabled some C++20 features on 8.3 with -std=c++2a (8.3 was released in Feb 2019), and I don’t feel that I’m missing out on any must-have features. However, with GCC11 which has an Aug 2021 release, Haiku really become cutting edge regarding available toolchains. Most of the Linux distros ship with Gcc10, so we’d be more up to date than the mainstream OS’s.
The latest nightly image now ships with Gcc 11 as the default. I’ve updates, and I’ve also compiled my apps, and so far so good … Great work Haiku porters