Hi
Tryting to build gcc-10 against mingw-w64-8.0.0, when compiling libgomp
it errors out with [1]
In file included from ../../../libgomp/oacc-parallel.c:30:
../../../libgomp/oacc-parallel.c: In function 'GOACC_parallel_keyed':
../../../libgomp/oacc-parallel.c:122:18: error: unknown conversion type
character 'l' in format [-Werror=format=]
122 | gomp_debug (0, "%s: mapnum=%"PRIu64", hostaddrs=%p, size=%p,
kinds=%p\n",
(and more)
The reason being that with mingw-w64-8.0.0, in _mingw.h
__USE_MINGW_ANSI_STDIO is now set to 1 (due to the "--->" lines here in
_mingw.h:
/* We are activating __USE_MINGW_ANSI_STDIO for various define
indicators.
* printf ll modifier (unsupported by msvcrt.dll) is required by
C99 and C++11 standards. */
#if (defined (_POSIX) || defined (_POSIX_SOURCE) || defined
(_POSIX_C_SOURCE) \
|| defined (_ISOC99_SOURCE) \
---> || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
&& __MSVCRT_VERSION__ < 0xE00) \
---> || (defined (__cplusplus) && __cplusplus >= 201103L &&
__MSVCRT_VERSION__ < 0xE00) \
|| defined (_XOPEN_SOURCE) || defined (_XOPEN_SOURCE_EXTENDED) \
|| defined (_GNU_SOURCE) \
|| defined (_SVID_SOURCE)) \
&& !defined(__USE_MINGW_ANSI_STDIO)
/* Enable __USE_MINGW_ANSI_STDIO if user did _not_ specify it
explicitly... */
# define __USE_MINGW_ANSI_STDIO 1
#endif
), whereas mingw-w64-7.0.0 didn't enable __USE_MINGW_ANSI_STDIO for
C99/C++11 (and hence this issue doesn't appear).
-Werror is passed when compiling libgomp (as it generally is in gcc
throughout), so this causes the build to fail. I'm unsure which is the
correct approach to deal with this?
Thanks for any pointers
Sandro
[1] https://kojipkgs.fedoraproject.org//work/tasks/9948/60029948/build.log
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public