In the x86 case, mingw-w64 stdio functions use 64-bit division, which
relies on certain routines in libgcc, and causes undefined references
under some circumstances.

Instead, the MS ones should be called, which are available immediately
and do not depend on libgcc. This was also the case prior to bfd33f6c.

Reference: https://github.com/msys2/MINGW-packages/pull/6539
Signed-off-by: Liu Hao <[email protected]>
---
 mingw-w64-libraries/winpthreads/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-libraries/winpthreads/Makefile.am
b/mingw-w64-libraries/winpthreads/Makefile.am
index e674a35e..8a3b758c 100644
--- a/mingw-w64-libraries/winpthreads/Makefile.am
+++ b/mingw-w64-libraries/winpthreads/Makefile.am
@@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I m4
 lib_LTLIBRARIES = libwinpthread.la
  include_HEADERS = include/pthread.h include/sched.h
include/semaphore.h include/pthread_unistd.h include/pthread_time.h
include/pthread_compat.h include/pthread_signal.h
-libwinpthread_la_CPPFLAGS = -I$(srcdir)/include -DIN_WINPTHREAD
-DWINPTHREAD_DBG=1
+libwinpthread_la_CPPFLAGS = -I$(srcdir)/include -DIN_WINPTHREAD
-DWINPTHREAD_DBG=1 -D__USE_MINGW_ANSI_STDIO=0
 libwinpthread_la_LDFLAGS = -no-undefined -version-info 1:0:0
-L$(builddir)/fakelib -Wc,-no-pthread
 EXTRA_libwinpthread_la_DEPENDENCIES = fakelib/libgcc.a
fakelib/libgcc_eh.a  fakelib/libgcc_s.a
 libwinpthread_la_SOURCES = \
-- 
2.17.1


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to