2023-11-28 5:27 AM - edited 2023-11-28 5:31 AM
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?
2023-11-28 6:37 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-11-28 9:19 PM
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.
2023-11-30 12:09 AM
@Souhaib MAZHOUD Were you able to reproduce the issue?
2023-11-30 12:37 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-12-05 4:14 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-12-05 10:06 AM
Having the same issue
2023-12-11 3:26 AM
I have also the same issue...
2023-12-12 11:19 PM
I also use the -flto flag, so I got the same warnings....
BR
Andreas
2024-01-01 6:03 AM
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:
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