After migration from older GCC to 10.2 linker produces warning regarding incorrect usage of -flto
I found that in ChibiOS it without value but should be with value.
I added next thing and warning doesn't appear anymore. Is it correct way?
Code: Select all
--- a/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/mk/rules.mk
@@ -24,7 +24,7 @@ endif
# Link time optimizations
ifeq ($(USE_LTO),yes)
- OPT += -flto
+ OPT += -flto=auto^M
endif