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

8c84b9
diff -rupN --no-dereference gcc-11.2.1-20210728/libgomp/libgomp.h gcc-11.2.1-20210728-new/libgomp/libgomp.h
8c84b9
--- gcc-11.2.1-20210728/libgomp/libgomp.h	2021-07-28 11:09:49.000000000 +0200
8c84b9
+++ gcc-11.2.1-20210728-new/libgomp/libgomp.h	2021-07-30 11:20:02.737945857 +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
8c84b9
@@ -173,7 +180,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)) \
8c84b9
@@ -186,11 +193,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;