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

36f940
diff -rupN --no-dereference gcc-12.2.1-20220819/libgomp/libgomp.h gcc-12.2.1-20220819-new/libgomp/libgomp.h
36f940
--- gcc-12.2.1-20220819/libgomp/libgomp.h	2022-08-19 19:14:13.000000000 +0200
36f940
+++ gcc-12.2.1-20220819-new/libgomp/libgomp.h	2022-08-30 09:35:11.552027662 +0200
8c84b9
@@ -69,6 +69,13 @@
8c84b9
 # endif
8c84b9
 #endif
8c84b9
 
8c84b9
+#include <stdio.h>
8c84b9
+#ifdef __MINGW_PRINTF_FORMAT
8c84b9
+#define PRINTF_FORMAT __MINGW_PRINTF_FORMAT
8c84b9
+#else
8c84b9
+#define PRINTF_FORMAT printf
8c84b9
+#endif
8c84b9
+
8c84b9
 #ifdef HAVE_ATTRIBUTE_VISIBILITY
8c84b9
 # pragma GCC visibility push(hidden)
8c84b9
 #endif
36f940
@@ -176,7 +183,7 @@ team_free (void *ptr)
8c84b9
 
8c84b9
 extern void gomp_vdebug (int, const char *, va_list);
8c84b9
 extern void gomp_debug (int, const char *, ...)
8c84b9
-	__attribute__ ((format (printf, 2, 3)));
8c84b9
+	__attribute__ ((format (PRINTF_FORMAT, 2, 3)));
8c84b9
 #define gomp_vdebug(KIND, FMT, VALIST) \
8c84b9
   do { \
8c84b9
     if (__builtin_expect (gomp_debug_var, 0)) \
36f940
@@ -189,11 +196,11 @@ extern void gomp_debug (int, const char
8c84b9
   } while (0)
8c84b9
 extern void gomp_verror (const char *, va_list);
8c84b9
 extern void gomp_error (const char *, ...)
8c84b9
-	__attribute__ ((format (printf, 1, 2)));
8c84b9
+	__attribute__ ((format (PRINTF_FORMAT, 1, 2)));
8c84b9
 extern void gomp_vfatal (const char *, va_list)
8c84b9
 	__attribute__ ((noreturn));
8c84b9
 extern void gomp_fatal (const char *, ...)
8c84b9
-	__attribute__ ((noreturn, format (printf, 1, 2)));
8c84b9
+	__attribute__ ((noreturn, format (PRINTF_FORMAT, 1, 2)));
8c84b9
 
8c84b9
 struct gomp_task;
8c84b9
 struct gomp_taskgroup;