Skip to content

Commit

Permalink
gcc/config/i386/mingw32.h: Ensure -lmsvcrt precede -lkernel32
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jonathan Yong <[email protected]>
  • Loading branch information
jon-y committed May 30, 2020
1 parent aef6e23 commit 850533a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/config/i386/mingw32.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ along with GCC; see the file COPYING3. If not see
#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} \
Expand Down

0 comments on commit 850533a

Please sign in to comment.