diff --git a/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch b/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch new file mode 100644 index 0000000..0f1bfa7 --- /dev/null +++ b/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch @@ -0,0 +1,40 @@ +diff -rupN --no-dereference gcc-10.2.1-20200723/libgomp/libgomp.h gcc-10.2.1-20200723-new/libgomp/libgomp.h +--- gcc-10.2.1-20200723/libgomp/libgomp.h 2020-07-23 11:18:20.000000000 +0200 ++++ gcc-10.2.1-20200723-new/libgomp/libgomp.h 2021-01-19 21:29:10.649983667 +0100 +@@ -69,6 +69,13 @@ + # endif + #endif + ++#include ++#ifdef __MINGW_PRINTF_FORMAT ++#define PRINTF_FORMAT __MINGW_PRINTF_FORMAT ++#else ++#define PRINTF_FORMAT printf ++#endif ++ + #ifdef HAVE_ATTRIBUTE_VISIBILITY + # pragma GCC visibility push(hidden) + #endif +@@ -173,7 +180,7 @@ team_free (void *ptr) + + extern void gomp_vdebug (int, const char *, va_list); + extern void gomp_debug (int, const char *, ...) +- __attribute__ ((format (printf, 2, 3))); ++ __attribute__ ((format (PRINTF_FORMAT, 2, 3))); + #define gomp_vdebug(KIND, FMT, VALIST) \ + do { \ + if (__builtin_expect (gomp_debug_var, 0)) \ +@@ -186,11 +193,11 @@ extern void gomp_debug (int, const char + } while (0) + extern void gomp_verror (const char *, va_list); + extern void gomp_error (const char *, ...) +- __attribute__ ((format (printf, 1, 2))); ++ __attribute__ ((format (PRINTF_FORMAT, 1, 2))); + extern void gomp_vfatal (const char *, va_list) + __attribute__ ((noreturn)); + extern void gomp_fatal (const char *, ...) +- __attribute__ ((noreturn, format (printf, 1, 2))); ++ __attribute__ ((noreturn, format (PRINTF_FORMAT, 1, 2))); + + struct gomp_task; + struct gomp_taskgroup; diff --git a/mingw-gcc.spec b/mingw-gcc.spec index 41d678b..dcdff5e 100644 --- a/mingw-gcc.spec +++ b/mingw-gcc.spec @@ -30,7 +30,7 @@ Name: mingw-gcc Version: %{gcc_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: MinGW Windows cross-compiler (GCC) for C License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions @@ -45,9 +45,12 @@ URL: http://gcc.gnu.org %global srcdir gcc-%{version}-%{DATE} Source0: %{srcdir}.tar.xz Patch0: mingw-gcc-config.patch +# See https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/8fd2fb03-9b8a-07e1-e162-0bb48bcc3984%40gmail.com/#msg37200751 +Patch1: 0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch BuildRequires: autoconf BuildRequires: gcc-c++ +BuildRequires: make BuildRequires: texinfo BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw64-filesystem >= 95 @@ -666,6 +669,9 @@ ln -sf %{mingw64_bindir}/libssp-0.dll %{buildroot}%{mingw64_libdir}/libssp.dll.a %changelog +* Tue Jan 19 12:33:56 CET 2021 Sandro Mani - 10.2.1-2 +- Rebuild (mingw-w64) + * Thu Dec 10 2020 Paolo Bonzini - 10.2.1-3 - Adjust ISL/CLOOG conditionals to look the same as native GCC