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

840c67
diff -rupN --no-dereference gcc-12.2.1-20220819/libgomp/libgomp.h gcc-12.2.1-20220819-new/libgomp/libgomp.h
840c67
--- gcc-12.2.1-20220819/libgomp/libgomp.h	2022-08-19 19:14:13.000000000 +0200
840c67
+++ gcc-12.2.1-20220819-new/libgomp/libgomp.h	2022-08-30 09:35:11.552027662 +0200
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
840c67
@@ -176,7 +183,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)) \
840c67
@@ -189,11 +196,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;