Compiling and linking with -flto works for me with GNU Arm Embedded Toolchain 10-2020-q4-major and 9-2020-q2-update if I use:
'arm-none-eabi-gcc-ar' instead of 'arm-none-eabi-ar'
'arm-none-eabi-gcc-nm' instead of 'arm-none-eabi-nm'
'arm-none-eabi-gcc-ranlib' instead of 'arm-none-eabi-ranlib'
Compiling and linking with -flto works for me with GNU Arm Embedded Toolchain 10-2020-q4-major and 9-2020-q2-update if I use: none-eabi- gcc-ar' instead of 'arm-none-eabi-ar' none-eabi- gcc-nm' instead of 'arm-none-eabi-nm' none-eabi- gcc-ranlib' instead of 'arm-none- eabi-ranlib'
'arm-
'arm-
'arm-
See: https:/ /stackoverflow. com/questions/ 25878407/ how-can- i-use-lto- with-static- libraries/ 25878408# 25878408