Fix CFLAGS for Windows MSVC.

This commit is contained in:
Frederik Seiffert 2021-03-10 21:36:04 +01:00
parent 39e556b037
commit f4ec7e8609
3 changed files with 15 additions and 0 deletions

View file

@ -3,6 +3,9 @@
* target.make:
Link against debug or release UCRT DLLs for Windows MSVC and remove
unused -pthread flag.
* configure:
* configure.ac:
Fix CFLAGS for Windows MSVC.
2021-02-12 Frederik Seiffert <frederik@algoriddim.com>

6
configure vendored
View file

@ -4918,6 +4918,12 @@ fi
fi
# On Windows MSVC, AC_PROG_CC will not detect Clang in MSVC mode as a
# GNU C compiler and therefore set CFLAGS to just "-g", so we fix it.
if test "$target_os" = windows -a x"${GCC}" != x"yes" -a x"$gs_cv_cc_is_clang" = x"yes"; then
CFLAGS="-g -O2"
fi
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:

View file

@ -243,6 +243,12 @@ else
AC_PROG_RANLIB
fi
# On Windows MSVC, AC_PROG_CC will not detect Clang in MSVC mode as a
# GNU C compiler and therefore set CFLAGS to just "-g", so we fix it.
if test "$target_os" = windows -a x"${GCC}" != x"yes" -a x"$gs_cv_cc_is_clang" = x"yes"; then
CFLAGS="-g -O2"
fi
AC_PROG_INSTALL
AC_MSG_CHECKING([if 'install -p' works])