cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE 1.14.0 flto build warning

SKape
Associate II

Hello. I have the following problem. When I enable flto optimization in a (freshly generated) project, several dozen warnings appear during compilation.

Sample warnings:

Drivers/STM32L4xx_HAL_Driver/Src/subdir.mk:88: warning: pattern recipe did not update peer target 'Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.su'.

Drivers/STM32L4xx_HAL_Driver/Src/subdir.mk:88: warning: pattern recipe did not update peer target 'Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.cyclo'.

This problem was not present on the previous version 1.13.2

How to solve this problem?

22 REPLIES 22
Souhaib MAZHOUD
ST Employee

Hello @SKape

First let me thank you for posting.

Could you please provide the exact parameter settings that you used in order to reproduce your issue.

I will be waiting for your feedback.

Thx

Souhaib 

SKape
Associate II

I'm generating a new one STM32 project using Wizard, for example for STM32F103CB.
In the project settings, in the compiler options (Tool Settings/MCU GCC Compiler/Miscellaneous/Other flags), I add the -flto option.
I add the same to the linker options. And that's all.
34 warnings appear during compilation.

@Souhaib MAZHOUD Were you able to reproduce the issue?

Hello @SKape 
Yes, this problem is reproduced in my side, I will check it internally and get back to you as soon as possible.

Thank you

Souhaib MAZHOUD
ST Employee

Hello again,

After check, this issue is reported internally to our team (Internal ticket number: 167964) and this will be fixed as soon as possible.

Thank you!

Souhaib

MD.8
Associate II

Having the same issue

Christian3000
Associate

I have also the same issue...

Schmidt.Andreas
Associate II

I also use the -flto flag, so I got the same warnings....

 

BR

Andreas

Hello,

i'd like to add, that i get the same problem (lots of "pattern recipe did not update peer target" from the build output, CubeIDE 1.14.0, STM32G474), but for a different reason (not using "-flto).

I use "-Wswitch-enum" for the whole project, but explicitly removed this setting for the "Driver" file tree.

Please also see here for a possible useful hint:

https://stackoverflow.com/questions/74449959/makefile-warning-pattern-recipe-did-not-update-peer-target

It seems this problem was introduced by version 4.4 of gnu-make.
So can i go back to pre-4.4 in CubeIDE, or is it hard-coded?

Thanks and BR,
Albert