https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108027
--- Comment #3 from cqwrteur <unlvsur at live dot com> --- (In reply to cqwrteur from comment #2) > (In reply to LIU Hao from comment #1) > > I need some information about this though: > > > > > > When multilib is enabled, does GCC still link programs with `-lmsvcrt`? > > There seems to be only reference to msvcrt: > > > > gcc/config/i386/mingw32.h:187: -lmoldname -lmingwex -lmsvcrt -lkernel32 > > " MCFGTHREAD_SPEC > > > > which is followed by `MCFGTHREAD_SPEC`. > > > > > > If GCC links against libmcfgthread in both m32 and m64, then I suspect there > > is only one issue: You forgot to install mcfgthread. I don't know whether > > libtool has builtin macros for multilib builds; by default libraries are > > installed into `<prefix>/lib` and you have to copy them into > > `<prefix>/lib32` and `<prefix>/lib64`, respectively. > > I do install mcfgthread. Yes. I do both of them. The problem is that libtool > will incorrectly link to lib/libmcfgthread.la even lib32/libmcfgthread.la > and lib/32/libmcfgthread.la exist. > Can you just remove the .la file? It finally gets to work by manually replacing all lib/libmcfgthread.la to lib32/libmcfgthread.la in 32 multilibs. I do not even think you ever tried how to build multilibs. If you want details, you can join QQ group 801441303