Skip to content

Commit 850533a

Browse files
committed
gcc/config/i386/mingw32.h: Ensure -lmsvcrt precede -lkernel32
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]>
1 parent aef6e23 commit 850533a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/config/i386/mingw32.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ along with GCC; see the file COPYING3. If not see
165165
#define REAL_LIBGCC_SPEC \
166166
"%{mthreads:-lmingwthrd} -lmingw32 \
167167
" SHARED_LIBGCC_SPEC " \
168-
-lmoldname -lmingwex -lmsvcrt"
168+
-lmoldname -lmingwex -lmsvcrt -lkernel32"
169169

170170
#undef STARTFILE_SPEC
171171
#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \

0 commit comments

Comments
 (0)