From 75849186609aa2b51f5ccbbff4cf4238ebb4cbcc Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 16 Apr 2019 16:44:56 +0200 Subject: [PATCH] Backport patch for GCC bug #88568 --- gcc_bug_88568.patch | 17 +++++++++++++++++ mingw-gcc.spec | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gcc_bug_88568.patch diff --git a/gcc_bug_88568.patch b/gcc_bug_88568.patch new file mode 100644 index 0000000..1342b22 --- /dev/null +++ b/gcc_bug_88568.patch @@ -0,0 +1,17 @@ +diff -rupN gcc-8.3.0/gcc/attribs.c gcc-8.3.0-new/gcc/attribs.c +--- gcc-8.3.0/gcc/attribs.c 2019-02-07 15:26:06.000000000 +0100 ++++ gcc-8.3.0-new/gcc/attribs.c 2019-04-16 15:58:04.405313950 +0200 +@@ -1685,8 +1685,11 @@ handle_dll_attribute (tree * pnode, tree + a function global scope, unless declared static. */ + if (current_function_decl != NULL_TREE && !TREE_STATIC (node)) + TREE_PUBLIC (node) = 1; +- /* Clear TREE_STATIC because DECL_EXTERNAL is set. */ +- TREE_STATIC (node) = 0; ++ /* Clear TREE_STATIC because DECL_EXTERNAL is set, unless ++ it is a C++ static data member. */ ++ if (DECL_CONTEXT (node) == NULL_TREE ++ || !RECORD_OR_UNION_TYPE_P (DECL_CONTEXT (node))) ++ TREE_STATIC (node) = 0; + } + + if (*no_add_attrs == false) diff --git a/mingw-gcc.spec b/mingw-gcc.spec index 8c2ff3d..47a768a 100644 --- a/mingw-gcc.spec +++ b/mingw-gcc.spec @@ -32,7 +32,7 @@ Name: mingw-gcc Version: 8.3.0 -Release: 1%{?snapshot_date:.svn.%{snapshot_date}.r%{snapshot_rev}}%{?dist} +Release: 2%{?snapshot_date:.svn.%{snapshot_date}.r%{snapshot_rev}}%{?dist} Summary: MinGW Windows cross-compiler (GCC) for C License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions @@ -45,6 +45,8 @@ Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz # Backport fix for ICE, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86593 Patch0: gcc_bug_86593.patch +# Backport fix for ICE, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88568 +Patch1: gcc_bug_88568.patch BuildRequires: gcc-c++ BuildRequires: texinfo @@ -709,6 +711,9 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-%{mingw64_target}-* %changelog +* Tue Apr 16 2019 Sandro Mani - 8.3.0-2 +- Backport patch for gcc #88568 + * Fri Feb 22 2019 Kalev Lember - 8.3.0-1 - Update to 8.3.0