summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2018-12-30 14:34:28 -0600
committerYaakov Selkowitz <yselkowi@redhat.com>2018-12-30 14:34:28 -0600
commit32165bd9cf6874f3b3988fd06d5bedfb4039ab9d (patch)
tree849fc4112bc285c0a6b9e0e8afb1ac3c8f52e62b
parentd254e9fc4d90da7d2695b758628d4e6976aaaa78 (diff)
downloadcygwin-gcc-32165bd9cf6874f3b3988fd06d5bedfb4039ab9d.tar.gz
cygwin-gcc-32165bd9cf6874f3b3988fd06d5bedfb4039ab9d.tar.xz
cygwin-gcc-32165bd9cf6874f3b3988fd06d5bedfb4039ab9d.zip
cygwin-gcc 7.4.0
-rw-r--r--.gitignore1
-rw-r--r--cygwin-gcc.spec12
-rw-r--r--pr47030.patch174
-rw-r--r--pr86138.patch176
-rw-r--r--sources2
5 files changed, 184 insertions, 181 deletions
diff --git a/.gitignore b/.gitignore
index 58bda16..41147a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/gcc-5.4.0.tar.bz2
/gcc-6.4.0.tar.xz
/gcc-7.3.0.tar.xz
+/gcc-7.4.0.tar.xz
diff --git a/cygwin-gcc.spec b/cygwin-gcc.spec
index 7ee3e35..28d0228 100644
--- a/cygwin-gcc.spec
+++ b/cygwin-gcc.spec
@@ -1,9 +1,9 @@
%global __os_install_post /usr/lib/rpm/brp-compress %{nil}
-%global gcc_version 7.3.0
+%global gcc_version 7.4.0
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 2
+%global gcc_release 1
%global build_ada 0
%global build_objc 0
@@ -77,7 +77,7 @@ Patch1000: 1000-cross-exe-suffix.patch
Patch1001: 1001-textdomain.patch
# Upstream patches
-Patch2000: pr86138.patch
+Patch2001: pr47030.patch
%description
Cygwin cross-compiler (GCC) suite.
@@ -324,7 +324,7 @@ Cygwin x86_64 cross-compiler for Ada.
%patch1000 -p1
%patch1001 -p1
-%patch2000 -p1
+%patch2001 -p2
echo %{gcc_version} > gcc/BASE-VER
echo 'Fedora Cygwin %{gcc_version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -753,6 +753,10 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%changelog
+* Sun Dec 30 2018 Yaakov Selkowitz <yselkowi@redhat.com> - 7.4.0-1
+- new version
+- Add patch for PR fortran/47030
+
* Thu Jul 12 2018 Yaakov Selkowitz <yselkowi@redhat.com> - 7.3.0-2
- Add patch for PR libstdc++/86138
diff --git a/pr47030.patch b/pr47030.patch
new file mode 100644
index 0000000..3ed4dbd
--- /dev/null
+++ b/pr47030.patch
@@ -0,0 +1,174 @@
+Binary files origsrc/gcc-7.3.0/gcc/fortran/.trans-decl.c.swp and src/gcc-7.3.0/gcc/fortran/.trans-decl.c.swp differ
+--- origsrc/gcc-7.3.0/gcc/fortran/trans-common.c 2017-01-09 00:42:09.155312000 +0100
++++ src/gcc-7.3.0/gcc/fortran/trans-common.c 2018-10-27 17:55:33.219386300 +0200
+@@ -102,6 +102,7 @@ along with GCC; see the file COPYING3.
+ #include "trans.h"
+ #include "stringpool.h"
+ #include "fold-const.h"
++#include "attribs.h"
+ #include "stor-layout.h"
+ #include "varasm.h"
+ #include "trans-types.h"
+@@ -423,6 +424,8 @@ build_common_decl (gfc_common_head *com,
+ /* If there is no backend_decl for the common block, build it. */
+ if (decl == NULL_TREE)
+ {
++ tree attributes;
++
+ if (com->is_bind_c == 1 && com->binding_label)
+ decl = build_decl (input_location, VAR_DECL, identifier, union_type);
+ else
+@@ -454,6 +457,13 @@ build_common_decl (gfc_common_head *com,
+
+ gfc_set_decl_location (decl, &com->where);
+
++/* check equivalence
++ attributes = gfc_add_attributes_to_decl (common_sym->attr, NULL_TREE);
++*/
++ attributes = gfc_add_attributes_to_decl (com->head->attr, NULL_TREE);
++ decl_attributes (&decl, attributes, 0);
++
++
+ if (com->threadprivate)
+ set_decl_tls_model (decl, decl_default_tls_model (decl));
+
+--- origsrc/gcc-7.3.0/gcc/fortran/trans-decl.c 2017-11-13 21:01:20.128076000 +0100
++++ src/gcc-7.3.0/gcc/fortran/trans-decl.c 2018-10-27 18:01:19.857314000 +0200
+@@ -1403,46 +1403,6 @@ gfc_add_assign_aux_vars (gfc_symbol * sy
+ }
+
+
+-static tree
+-add_attributes_to_decl (symbol_attribute sym_attr, tree list)
+-{
+- unsigned id;
+- tree attr;
+-
+- for (id = 0; id < EXT_ATTR_NUM; id++)
+- if (sym_attr.ext_attr & (1 << id))
+- {
+- attr = build_tree_list (
+- get_identifier (ext_attr_list[id].middle_end_name),
+- NULL_TREE);
+- list = chainon (list, attr);
+- }
+-
+- if (sym_attr.omp_declare_target_link)
+- list = tree_cons (get_identifier ("omp declare target link"),
+- NULL_TREE, list);
+- else if (sym_attr.omp_declare_target)
+- list = tree_cons (get_identifier ("omp declare target"),
+- NULL_TREE, list);
+-
+- if (sym_attr.oacc_function)
+- {
+- tree dims = NULL_TREE;
+- int ix;
+- int level = sym_attr.oacc_function - 1;
+-
+- for (ix = GOMP_DIM_MAX; ix--;)
+- dims = tree_cons (build_int_cst (boolean_type_node, ix >= level),
+- integer_zero_node, dims);
+-
+- list = tree_cons (get_identifier ("oacc function"),
+- dims, list);
+- }
+-
+- return list;
+-}
+-
+-
+ static void build_function_decl (gfc_symbol * sym, bool global);
+
+
+@@ -1689,7 +1649,7 @@ gfc_get_symbol_decl (gfc_symbol * sym)
+ VAR_DECL, gfc_sym_identifier (sym), gfc_sym_type (sym));
+
+ /* Add attributes to variables. Functions are handled elsewhere. */
+- attributes = add_attributes_to_decl (sym->attr, NULL_TREE);
++ attributes = gfc_add_attributes_to_decl (sym->attr, NULL_TREE);
+ decl_attributes (&decl, attributes, 0);
+
+ /* Symbols from modules should have their assembler names mangled.
+@@ -1921,7 +1881,7 @@ get_proc_pointer_decl (gfc_symbol *sym)
+ && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
+ set_decl_tls_model (decl, decl_default_tls_model (decl));
+
+- attributes = add_attributes_to_decl (sym->attr, NULL_TREE);
++ attributes = gfc_add_attributes_to_decl (sym->attr, NULL_TREE);
+ decl_attributes (&decl, attributes, 0);
+
+ return decl;
+@@ -2114,7 +2074,7 @@ module_sym:
+ DECL_EXTERNAL (fndecl) = 1;
+ TREE_PUBLIC (fndecl) = 1;
+
+- attributes = add_attributes_to_decl (sym->attr, NULL_TREE);
++ attributes = gfc_add_attributes_to_decl (sym->attr, NULL_TREE);
+ decl_attributes (&fndecl, attributes, 0);
+
+ gfc_set_decl_assembler_name (fndecl, mangled_name);
+@@ -2221,7 +2181,7 @@ build_function_decl (gfc_symbol * sym, b
+ if (sym->attr.referenced || sym->attr.entry_master)
+ TREE_USED (fndecl) = 1;
+
+- attributes = add_attributes_to_decl (attr, NULL_TREE);
++ attributes = gfc_add_attributes_to_decl (attr, NULL_TREE);
+ decl_attributes (&fndecl, attributes, 0);
+
+ /* Figure out the return type of the declared function, and build a
+@@ -6647,5 +6607,43 @@ gfc_process_block_locals (gfc_namespace*
+ saved_local_decls = NULL_TREE;
+ }
+
++tree
++gfc_add_attributes_to_decl (symbol_attribute sym_attr, tree list)
++{
++ unsigned id;
++ tree attr;
++
++ for (id = 0; id < EXT_ATTR_NUM; id++)
++ if (sym_attr.ext_attr & (1 << id))
++ {
++ attr = build_tree_list (
++ get_identifier (ext_attr_list[id].middle_end_name),
++ NULL_TREE);
++ list = chainon (list, attr);
++ }
++
++ if (sym_attr.omp_declare_target_link)
++ list = tree_cons (get_identifier ("omp declare target link"),
++ NULL_TREE, list);
++ else if (sym_attr.omp_declare_target)
++ list = tree_cons (get_identifier ("omp declare target"),
++ NULL_TREE, list);
++
++ if (sym_attr.oacc_function)
++ {
++ tree dims = NULL_TREE;
++ int ix;
++ int level = sym_attr.oacc_function - 1;
++
++ for (ix = GOMP_DIM_MAX; ix--;)
++ dims = tree_cons (build_int_cst (boolean_type_node, ix >= level),
++ integer_zero_node, dims);
++
++ list = tree_cons (get_identifier ("oacc function"),
++ dims, list);
++ }
++
++ return list;
++}
+
+ #include "gt-fortran-trans-decl.h"
+--- origsrc/gcc-7.3.0/gcc/fortran/trans-types.h 2017-11-13 21:01:20.128076000 +0100
++++ src/gcc-7.3.0/gcc/fortran/trans-types.h 2018-10-27 16:22:52.225379600 +0200
+@@ -98,6 +98,8 @@ tree gfc_get_array_type_bounds (tree, in
+ enum gfc_array_kind, bool);
+ tree gfc_get_nodesc_array_type (tree, gfc_array_spec *, gfc_packed, bool);
+
++tree gfc_add_attributes_to_decl (symbol_attribute sym_attr, tree list);
++
+ /* Add a field of given name and type to a UNION_TYPE or RECORD_TYPE. */
+ tree gfc_add_field_to_struct (tree, tree, tree, tree **);
+
diff --git a/pr86138.patch b/pr86138.patch
deleted file mode 100644
index a84e0e7..0000000
--- a/pr86138.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-From 2cca047791a52015d63fd42e9791ed7dc237099d Mon Sep 17 00:00:00 2001
-From: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 22 Jun 2018 15:58:38 +0000
-Subject: [PATCH] PR libstdc++/86138 prevent implicit instantiation of COW
- empty rep
-
-The explicit instantiation declarations for std::basic_string are
-disabled for C++17 (and later) so that basic_string symbols get
-implicitly instantiated in every translation unit that needs them. On
-targets that don't support STB_GNU_UNIQUE this leads to multiple copies
-of the empty rep symbol for COW strings. In order to detect whether a
-COW string needs to deallocate its storage it compares the address with
-the empty rep. When there are multiple copies of the empty rep object
-the address is not unique, and so string destructors try to delete the
-empty rep, which crashes.
-
-In order to guarantee uniqueness of the _S_empty_rep_storage symbol this
-patch adds an explicit instantiation declaration for just that symbol.
-This means the other symbols are still implicitly instantiated in C++17
-code, but for the empty rep the definition in the library gets used.
-
-Separately, there is no need for C++17 code to implicitly instantiate
-the I/O functions for strings, so this also restores the explicit
-instantiation declarations for those functions.
-
-Backport from mainline
-2018-06-22 Jonathan Wakely <jwakely@redhat.com>
-
- PR libstdc++/86138
- * include/bits/basic_string.tcc:
- [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
- (basic_string<char>::_Rep::_S_empty_rep_storage)
- (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
- instantiation declarations.
- [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
- explicit instantiation declarations.
- * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
- * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@261907 138bc75d-0d04-0410-961f-82ee72b054a4
----
- libstdc++-v3/ChangeLog | 16 ++++++++++
- libstdc++-v3/include/bits/basic_string.tcc | 25 ++++++++++++++--
- .../basic_string/cons/char/86138.cc | 30 +++++++++++++++++++
- .../basic_string/cons/wchar_t/86138.cc | 30 +++++++++++++++++++
- 4 files changed, 98 insertions(+), 3 deletions(-)
- create mode 100644 libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
- create mode 100644 libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
-
-diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
-index 41b7fa196b0..d185a54aaf0 100644
---- a/libstdc++-v3/include/bits/basic_string.tcc
-+++ b/libstdc++-v3/include/bits/basic_string.tcc
-@@ -1597,8 +1597,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
- // Inhibit implicit instantiations for required instantiations,
- // which are defined via explicit instantiations elsewhere.
--#if _GLIBCXX_EXTERN_TEMPLATE > 0 && __cplusplus <= 201402L
-+#if _GLIBCXX_EXTERN_TEMPLATE > 0
-+ // The explicit instantiations definitions in src/c++11/string-inst.cc
-+ // are compiled as C++14, so the new C++17 members aren't instantiated.
-+ // Until those definitions are compiled as C++17 suppress the declaration,
-+ // so C++17 code will implicitly instantiate std::string and std::wstring
-+ // as needed.
-+# if __cplusplus <= 201402L
- extern template class basic_string<char>;
-+# elif ! _GLIBCXX_USE_CXX11_ABI
-+ // Still need to prevent implicit instantiation of the COW empty rep,
-+ // to ensure the definition in libstdc++.so is unique (PR 86138).
-+ extern template basic_string<char>::size_type
-+ basic_string<char>::_Rep::_S_empty_rep_storage[];
-+# endif
-+
- extern template
- basic_istream<char>&
- operator>>(basic_istream<char>&, string&);
-@@ -1613,7 +1626,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- getline(basic_istream<char>&, string&);
-
- #ifdef _GLIBCXX_USE_WCHAR_T
-+# if __cplusplus <= 201402L
- extern template class basic_string<wchar_t>;
-+# elif ! _GLIBCXX_USE_CXX11_ABI
-+ extern template basic_string<wchar_t>::size_type
-+ basic_string<wchar_t>::_Rep::_S_empty_rep_storage[];
-+# endif
-+
- extern template
- basic_istream<wchar_t>&
- operator>>(basic_istream<wchar_t>&, wstring&);
-@@ -1626,8 +1645,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- extern template
- basic_istream<wchar_t>&
- getline(basic_istream<wchar_t>&, wstring&);
--#endif
--#endif
-+#endif // _GLIBCXX_USE_WCHAR_T
-+#endif // _GLIBCXX_EXTERN_TEMPLATE > 0
-
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace std
-diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
-new file mode 100644
-index 00000000000..a85fd9c82c9
---- /dev/null
-+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
-@@ -0,0 +1,30 @@
-+// Copyright (C) 2018 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 3, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING3. If not see
-+// <http://www.gnu.org/licenses/>.
-+
-+// { dg-options "-std=gnu++17" }
-+// { dg-do compile { target c++1z } }
-+// { dg-final { scan-assembler-not "_ZNSs4_Rep20_S_empty_rep_storageE:" } }
-+
-+#undef _GLIBCXX_USE_CXX11_ABI
-+#define _GLIBCXX_USE_CXX11_ABI 0
-+#include <string>
-+
-+void
-+test01(std::string* s)
-+{
-+ s->~basic_string();
-+}
-diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
-new file mode 100644
-index 00000000000..d77922976d0
---- /dev/null
-+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
-@@ -0,0 +1,30 @@
-+// Copyright (C) 2018 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 3, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING3. If not see
-+// <http://www.gnu.org/licenses/>.
-+
-+// { dg-options "-std=gnu++17" }
-+// { dg-do compile { target c++1z } }
-+// { dg-final { scan-assembler-not "_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE:" } }
-+
-+#undef _GLIBCXX_USE_CXX11_ABI
-+#define _GLIBCXX_USE_CXX11_ABI 0
-+#include <string>
-+
-+void
-+test01(std::wstring* s)
-+{
-+ s->~basic_string();
-+}
---
-2.18.0
-
diff --git a/sources b/sources
index 8891b54..0940243 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-be2da21680f27624f3a87055c4ba5af2 gcc-7.3.0.tar.xz
+6e9d754638ff03d2e9b2aff55aed82b4 gcc-7.4.0.tar.xz