Skip to content

Conversation

RobinKastberg
Copy link
Contributor

The hardcoded flag in #84974 causes some issues with IAR.

This tries to set -std=gnu11 in a more toolchain independent way.

Trying to fix this to start work on hal_rpi_pico using IAR toolchain.

I tried doing in the "proper cmake way", there are a couple of other ways, but I don't have experience enough in these parts to have an opinion:

  • Add this to zephyr_library_property?
  • Add generator expressions to compiler/linker in style with other flags
  • if(CMAKE_C_COMPILER_ID

I'm not sure that mixing and matching C++ versions in the same linking unit is wise anyway?
And if #30105 goes through, maybe we can have the right version globally?

@RobinKastberg RobinKastberg changed the title modules: hal_rpi_pico modules: hal_rpi_pico: set -std=gnu11 in a more toolchain independent way. May 12, 2025
@github-actions github-actions bot added platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico) size: XS A PR changing only a single line of code labels May 12, 2025
Copy link
Member

@soburi soburi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your fix.

@RobinKastberg
Copy link
Contributor Author

Just saw that my commit message is bad. Lemme fix that first.

Copy link
Member

@soburi soburi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#89822 (comment)

It's definitely a good idea to revise the commit title.
I'll submit a request changes for now.

Set `-std=gnu11` in a more toolchain independent way.

Signed-off-by: Robin Kastberg <[email protected]>
Copy link

@kartben kartben merged commit 05401b3 into zephyrproject-rtos:main May 19, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: Raspberry Pi Pico Raspberry Pi Pico (RPi Pico) size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants