Update GCC, C++20 to the latest version

As I read in Telegram there are problems to port apps like Telegram to Haiku.
GCC, C++20 would need an Update.

I just liked to start a discussion about that.thx…

1 Like

There is nothing to discuss. Someone needs to do the work and submit the patch.

For some previous versions this was done by mt and korli. Probably other people worked on it too. It seems everyone has been busy with other problems at the moment.

4 Likes

Ah ok, that’s good to know… Should I delete this post then? Or leavee it for reference?

I did the GCC 11 recipe in HP, but I am not entirely sure what else needs to be done to switch. Any hints?

Haiku itself is not built with the compiler from the haikuports recipe. It is built from the compiler in the buildtools repository. I am not sure why we maintain that, since it seems possible to build everything with the one from the recipe, but that’s how it is now.

So:

  • Update the buildtools repository with current gcc and binutils sources, making sure to preserve any haiku specific patches that could be there. The repository is not structured in a way that makes this easy.
  • Once you have updated this repository, use the configure script from Haiku to build a compiler from it
  • Build Haiku using that compiler
  • Report any problems you find. Does it compile? Does it boot?

Or alternatively, replace the first step with:

  • Rewrite the Haiku configure script to not use the buildtools repository and use gcc/binutils sources directly

That’s for building Haiku itself with a newer compiler. It should already be possible to enable the gcc11 recipe on haikuports side, and start using it for some applications? We may get in trouble as mixing various libstdc++ versions usually don’t go so well, however.

1 Like

Telegram for Haiku has been great so far. I’m impressed with what they achieved.

1 Like

I already did this locally and haven’t seen any negative aspects.

I built GCC11 with the cross scripts, AFAIR there was problems building Haiku with it, but can’t recall the exact problem.

To build Telegram using gcc8, I have to do a lot of workarounds in the code every time -

5 Likes