https://sourceware.org/bugzilla/show_bug.cgi?id=29998
--- Comment #7 from Jan Janssen <medhefgo at web dot de> --- > I am stuck here because I do not have > /usr/lib/gcc/x86_64-w64-mingw32/12.2.0/lto-wrapper installed (and just using > a dummy empty file does not work). It's as easy as: $ deboostrap --include=gcc-12,gcc-10,gcc-mingw-w64-x86-64 sid debian-unstable $ systemd-nspawn -M debian-unstable To get the same env as me when I tried reproducing on a different distro. Also, on debian the wrapper is located in /usr/lib/gcc/x86_64-w64-mingw32/12-win32/lto-wrapper > As a quick test, if you have both gcc 12 and gcc 10 installed, does editing > that command line above and using the gcc 10 plugin and/or gcc 10 lto-wrapper > script make the link work ? This is rather tricky as there is only one version of mingw-gcc in distros so I used the regular gcc (if it helps)… $ COLLECT_GCC=x86_64-w64-mingw32-gcc COLLECT_GCC_OPTIONS="-flto=auto -nostdlib -o test.exe -mtune=generic -march=x86-64 -dumpdir test." /usr/bin/x86_64-w64-mingw32-ld -plugin /usr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper -plugin-opt=-fresolution=/tmp/ccl4X7GI.res -m i386pep -Bdynamic -o test.exe -L/usr/lib/gcc/x86_64-w64-mingw32/12-win32 -L/usr/lib/gcc/x86_64-w64-mingw32/12-win32/../../../../x86_64-w64-mingw32/lib test2.obj libtest.a -lgcc Segmentation fault (core dumped) > Also - does adding "-plugin-opt=-debug" to the command line produce any more > helpful output ? /usr/lib/gcc/x86_64-w64-mingw32/12.2.0/lto-wrapper -fresolution=/tmp/cc9yab77.res -flinker-output=exec test2.obj test1.obj /usr/lib/gcc/x86_64-w64-mingw32/12.2.0/lto-wrapper @test.lto_wrapper_args (Same output with successful mingw-gcc10) -- You are receiving this mail because: You are on the CC list for the bug.
