Blame SOURCES/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch

6c4273
diff -rupN --no-dereference gcc-12.0.1-20220308/libgomp/libgomp.h gcc-12.0.1-20220308-new/libgomp/libgomp.h
6c4273
--- gcc-12.0.1-20220308/libgomp/libgomp.h	2022-03-08 12:23:45.000000000 +0100
6c4273
+++ gcc-12.0.1-20220308-new/libgomp/libgomp.h	2022-03-11 16:00:28.480133277 +0100
6bc895
@@ -69,6 +69,13 @@
6bc895
 # endif
6bc895
 #endif
6bc895
 
6bc895
+#include <stdio.h>
6bc895
+#ifdef __MINGW_PRINTF_FORMAT
6bc895
+#define PRINTF_FORMAT __MINGW_PRINTF_FORMAT
6bc895
+#else
6bc895
+#define PRINTF_FORMAT printf
6bc895
+#endif
6bc895
+
6bc895
 #ifdef HAVE_ATTRIBUTE_VISIBILITY
6bc895
 # pragma GCC visibility push(hidden)
6bc895
 #endif
6c4273
@@ -177,7 +184,7 @@ team_free (void *ptr)
6bc895
 
6bc895
 extern void gomp_vdebug (int, const char *, va_list);
6bc895
 extern void gomp_debug (int, const char *, ...)
6bc895
-	__attribute__ ((format (printf, 2, 3)));
6bc895
+	__attribute__ ((format (PRINTF_FORMAT, 2, 3)));
6bc895
 #define gomp_vdebug(KIND, FMT, VALIST) \
6bc895
   do { \
6bc895
     if (__builtin_expect (gomp_debug_var, 0)) \
6c4273
@@ -190,11 +197,11 @@ extern void gomp_debug (int, const char
6bc895
   } while (0)
6bc895
 extern void gomp_verror (const char *, va_list);
6bc895
 extern void gomp_error (const char *, ...)
6bc895
-	__attribute__ ((format (printf, 1, 2)));
6bc895
+	__attribute__ ((format (PRINTF_FORMAT, 1, 2)));
6bc895
 extern void gomp_vfatal (const char *, va_list)
6bc895
 	__attribute__ ((noreturn));
6bc895
 extern void gomp_fatal (const char *, ...)
6bc895
-	__attribute__ ((noreturn, format (printf, 1, 2)));
6bc895
+	__attribute__ ((noreturn, format (PRINTF_FORMAT, 1, 2)));
6bc895
 
6bc895
 struct gomp_task;
6bc895
 struct gomp_taskgroup;