Don't use -mthreads option when building with MinGW

This option seems to be obsolete and was only ever needed for classic
MinGW32 which is not even supported any more.

This basically reverts a0b9e27fd4 (Applied Fabian Wenzel's patches to
add -mthreads for threads to work in MinGW., 2002-08-28).

See #23314.

Closes #23316.
This commit is contained in:
Vadim Zeitlin 2023-03-06 17:08:56 +01:00
parent d5a90896ae
commit 9b0ebf2c3a
2 changed files with 1 additions and 81 deletions

View file

@ -4240,11 +4240,9 @@ dnl flush the cache
AC_CACHE_SAVE
dnl ---------------------------------------------------------------------------
dnl thread support for Unix (for Win32 and OS/2 see past
dnl the next matching "else")
dnl thread support for Unix (other platforms don't need anything special)
dnl ---------------------------------------------------------------------------
dnl under MSW (except mingw32) we always have thread support
if test "$TOOLKIT" != "MSW"; then
dnl the code below:
@ -4624,37 +4622,6 @@ if test "$TOOLKIT" != "MSW"; then
fi
fi
fi
dnl from if !MSW
else
if test "$wxUSE_THREADS" = "yes" ; then
case "${host}" in
x86_64-*-mingw* )
;;
*-*-mingw32* )
dnl check if the compiler accepts -mthreads
AC_CACHE_CHECK([if compiler supports -mthreads],
wx_cv_cflags_mthread,
[
CFLAGS_OLD="$CFLAGS"
CFLAGS="-mthreads $CFLAGS"
AC_TRY_COMPILE([], [],
wx_cv_cflags_mthread=yes,
wx_cv_cflags_mthread=no
)
]
)
if test "$wx_cv_cflags_mthread" = "yes"; then
dnl it does, use it
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -mthreads"
LDFLAGS="$LDFLAGS -mthreads"
else
dnl it doesn't
CFLAGS="$CFLAGS_OLD"
fi
;;
esac
fi
fi
AC_CHECK_FUNC(localtime_r, [ AC_DEFINE(HAVE_LOCALTIME_R) ])