Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++20 #326

Closed
rleh opened this issue Feb 10, 2020 · 14 comments
Closed

C++20 #326

rleh opened this issue Feb 10, 2020 · 14 comments

Comments

@rleh
Copy link
Member

rleh commented Feb 10, 2020

A lot of the C++20 features are already available with GCC9, most big features (Coroutines, Concepts, ...) will require GCC10.

For a complete list see https://en.cppreference.com/w/cpp/compiler_support.

@salkinium
Copy link
Member

salkinium commented Feb 12, 2020

In addition, the GCC AVR backend will be deprecated in v10 and removed in v11 (~2021 release), so we may gain C++20 while loosing AVR support. Since Cortex-M development is de-prioritized by ARM for GCC as well with new features (Helium extension etc) only being added to LLVM, it may be necessary to switch to LLVM as our primary supported compiler.

@salkinium salkinium pinned this issue Mar 3, 2020
@henrikssn
Copy link
Contributor

What is the main effort of upgrading to GCC 10?

As @salkinium says, AVR is supported (but deprecated) there so that should not technically be a blocker.

@salkinium
Copy link
Member

What is the main effort of upgrading to GCC 10?

  • hosted gcc is v10 in CI and Linux and macOS.
  • avr-gcc is v10 in the CI (and Linux) and on macOS. Don't care about AVR+Windows for now.
  • arm-none-eabi-gcc is still v9 though and will probably only be upgraded by ARM at the end of the year? Or maybe perhaps already in Q3?

So I'm waiting on ARM.

@rleh
Copy link
Member Author

rleh commented Sep 14, 2020

Main motivation for the upgrade to GCC10 are C++20 features, mainly Concepts. See discussions #341 and #353.

@rleh
Copy link
Member Author

rleh commented Sep 14, 2020

hosted gcc is v10 in CI and Linux and macOS.

Most Linux distributions (Ubuntu, Fedora, Arch, Debian) have GCC10, that probably concerns most modm users.
MinGW is only version 9.2, so Windows CI would be an issue. (Hosted on Windows could be disabled in CI until MinGW update is available.)

avr-gcc

I hope AVR-support will stay in GCC after version 11, there is a chance: https://www.bountysource.com/issues/84630749-avr-convert-the-backend-to-mode_cc-so-it-can-be-kept-in-future-releases

@rleh
Copy link
Member Author

rleh commented Sep 14, 2020

So I'm waiting on ARM.

There already is a ARM GCC 10 "Preview": https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads#panel2a

What's new in 10-2020-q2-preview

This is a preview release for M-profile Vector Extension (MVE) and Custom Datapath Extension (CDE) features, and is not a production release. Please use the GNU Arm Embedded Toolchain 9-2020-q2-update release for production use-cases

@salkinium
Copy link
Member

Hui! So I can already play around with Coroutines on Cortex-M? The fibers are quivering!1!!

@salkinium
Copy link
Member

ARM GCC 10 is now out of preview and available!

@rleh
Copy link
Member Author

rleh commented Dec 18, 2020

Nice!
I'm going to update our CI docker images (and move them to Github Container Registry ghcr.io) and update the installation guide, ok?

@salkinium
Copy link
Member

Yes, please!
The macOS CI will update itself once my PR is merged: osx-cross/homebrew-arm#16

@salkinium
Copy link
Member

Looking at the GCC Standards Support we still won't get full C++20 features with v10 and even in v11 some things are still missing.

So we have to be a little careful about what features we use.

@ghost
Copy link

ghost commented Jan 27, 2021

Does this have interest C++20 Register abstraction?

@jevinskie
Copy link

Good news, the AVR CC0 port bounty was completed and the work was checked in to mainline.

@salkinium
Copy link
Member

salkinium commented May 31, 2021

avr-gcc v11 is now also available on macOS and we can port the changes (if any) to our avr-gcc Linux repo:
osx-cross/homebrew-avr@252b2f5

We'll have to wait and see if the ARM toolchain goes GCC11 or stays another 6 months at GCC10.

@modm-io modm-io locked and limited conversation to collaborators Sep 29, 2021
@salkinium salkinium unpinned this issue Sep 29, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Development

No branches or pull requests

4 participants