Comment 4 for bug 1689294

Revision history for this message
MichaƂ Fita (michal.fita) wrote :

Thank for getting back to me @jinyun-ye, but your example it too simple.

I enclosed dumb demo that demonstrates the problem, in general you need to link multiple object files or archives into a final binary for the bug to manifest itself.

The `build.bat` uses -flto=3 in the last step, which fails:
C:\...\AppData\Local\GCC_ARM\8.3.1-2019q3\bin\arm-none-eabi-g++.exe -flto=3 -mcpu=cortex-m7 -mthumb -ggdb -ffunction-sections -fdata-sections -std=gnu++14 -fno-rtti wolf.o hornet.o main.o syscalls.o -o application.elf
lto-wrapper.exe: fatal error: CreateProcess: No such file or directory
compilation terminated.
c:/users/sesa404214/appdata/local/gcc_arm/8.3.1-2019q3/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status

This example doesn't manifest the case with -flto -fuse-linker-plugin, which I believe requires some archive to be linked (that's the case of the project I working on at the moment). I'll see if I can prepare an example for such case as well.