This is necessary as libmsvcrt.a is not a pure import library, but
also contains some functions that invoke others in KERNEL32.DLL.
gcc/
* config/i386/mingw32.h (REAL_LIBGCC_SPEC): Insert -lkernel32
after -lmsvcrt. This is necessary as libmsvcrt.a is not a pure
import library, but also contains some functions that invoke
others in KERNEL32.DLL.
Signed-off-by: Liu Hao <lh_mouse@126.com>
Signed-off-by: Jonathan Yong <10walls@gmail.com>
#define REAL_LIBGCC_SPEC \
"%{mthreads:-lmingwthrd} -lmingw32 \
" SHARED_LIBGCC_SPEC " \
- -lmoldname -lmingwex -lmsvcrt"
+ -lmoldname -lmingwex -lmsvcrt -lkernel32"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \