[PATCH 0/1] MR4642: configure: Use Wine includes for cross compiler checks.
C99 checks depend on stddef.h and stdarg.h. Those headers are usually shipped with compilers (and another copy of them as part of mingw-w64 for targets that use it), but some providers skip them. We use our own version during the build anyway, so we may use them for configure checks as well. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4642
From: Jacek Caban <jacek(a)codeweavers.com> C99 checks depend on stddef.h and stdarg.h. Those headers are usually shipped with compilers (and another copy of them as part of mingw-w64 for targets that use it), but some providers skip them. We use our own version during the build anyway, so we may use them for configure checks as well. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 26bcc3f6c21..0dc083bec86 100644 --- a/configure.ac +++ b/configure.ac @@ -924,6 +924,7 @@ This is an error since --enable-archs=$wine_arch was requested.])]) continue fi + CFLAGS="$CFLAGS -I$srcdir/include/msvcrt/ -I$srcdir/include/" AS_VAR_PUSHDEF([wine_cv_crosscc_c99],[ac_cv_${wine_arch}_crosscc_c99]) AC_MSG_CHECKING([for $CC option to enable C99 features]) AC_CACHE_VAL([wine_cv_crosscc_c99], -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4642
On FreeBSD, this enables LLVM from ports to be used as the mingw cross-compiler: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274542 ``` $ export PATH=/usr/local/llvm17/bin:$PATH $ ./configure --enable-win64 --with-mingw=clang CC=clang CXX=clang++ CPPFLAGS=-I/usr/local/include ``` I filed [a bug report](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274542) for FreeBSD excluding these header files, and [am starting](https://github.com/freebsd/freebsd-src/pull/915) to fix it. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4642#note_55496
This merge request was closed by Jacek Caban. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4642
Fixed on FreeBSD side. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4642#note_111192
participants (3)
-
Brendan Shanks (@bshanks) -
Jacek Caban -
Jacek Caban (@jacek)