https://sourceware.org/bugzilla/show_bug.cgi?id=29389
--- Comment #6 from Alan Modra <amodra at gmail dot com> --- You are missing rather a lot of object files and libraries in that zip. Besides the libraries you specify with -l, there are also some objects and libraries that your cc adds. You can see those by adding -Wl,-v to the command in comment #4, or perhaps more conveniently by adding -Wl,-t. It is quite likely that those other objects and libraries are different between your two systems, and why you say "It completes successfully on my Arch Linux box, but it fails on MSYS2 MINGW64." -- You are receiving this mail because: You are on the CC list for the bug.