pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/gcc48 gcc48: fix build when building with newer G...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6abe8d74042c
branches:  trunk
changeset: 309915:6abe8d74042c
user:      maya <maya%pkgsrc.org@localhost>
date:      Wed Jun 27 10:07:07 2018 +0000

description:
gcc48: fix build when building with newer GCC by backporting
an upstream commit.

PR pkg/53402, PR pkg/53403, PR pkg/53404, PR pkg/53231

diffstat:

 lang/gcc48/distinfo                          |   6 +-
 lang/gcc48/patches/patch-gcc_cp_Make-lang.in |  25 ++++++++
 lang/gcc48/patches/patch-gcc_cp_cfns.gperf   |  37 ++++++++++++
 lang/gcc48/patches/patch-gcc_cp_cfns.h       |  85 ++++++++++++++++++++++++++++
 lang/gcc48/patches/patch-gcc_cp_except.c     |  26 ++++++++
 5 files changed, 178 insertions(+), 1 deletions(-)

diffs (209 lines):

diff -r 18179a903f35 -r 6abe8d74042c lang/gcc48/distinfo
--- a/lang/gcc48/distinfo       Wed Jun 27 06:26:10 2018 +0000
+++ b/lang/gcc48/distinfo       Wed Jun 27 10:07:07 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.36 2017/07/28 23:40:07 maya Exp $
+$NetBSD: distinfo,v 1.37 2018/06/27 10:07:07 maya Exp $
 
 SHA1 (ecj-4.5.jar) = 58c1d79c64c8cd718550f32a932ccfde8d1e6449
 RMD160 (ecj-4.5.jar) = d3f4da657f086b6423f74e93f001132f4855368a
@@ -48,6 +48,10 @@
 SHA1 (patch-gcc_config_sol2.h) = de6455ee88f281737501287759b7a83b8db05398
 SHA1 (patch-gcc_config_x-netbsd) = 6dc3d78e26df62054ea29f98ca51592858e671e3
 SHA1 (patch-gcc_configure) = 58f2688999a81a9cf1ef7c70f052f329e6b4fe7c
+SHA1 (patch-gcc_cp_Make-lang.in) = 0bf7b2bb5e68119664082afce32a36501948df69
+SHA1 (patch-gcc_cp_cfns.gperf) = f83414c2748aa0f9f40c8383f66b365838dccd07
+SHA1 (patch-gcc_cp_cfns.h) = 111dac697f91db2020ad103c5b59c7efb9492fa1
+SHA1 (patch-gcc_cp_except.c) = c96ca1aca26ccb4930139c6b656ffa9e462de6b4
 SHA1 (patch-gcc_doc_gcc.texi) = 0b6ea28f887efc78ebd2f450c3f59ee7eaa15117
 SHA1 (patch-gcc_fortran_f95-lang.c) = 8dc0a1728fd0521caf71a4f5c2eb938340f20efa
 SHA1 (patch-gcc_ggc-common.c) = fa577bc25260d7e6304f166686ba51c0b677d7f6
diff -r 18179a903f35 -r 6abe8d74042c lang/gcc48/patches/patch-gcc_cp_Make-lang.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc48/patches/patch-gcc_cp_Make-lang.in      Wed Jun 27 10:07:07 2018 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-gcc_cp_Make-lang.in,v 1.1 2018/06/27 10:07:08 maya Exp $
+
+Backport upstream commit to fix build with newer GCC
+
+ 2016-02-19 Jakub Jelinek <jakub%redhat.com@localhost>
+
+            Bernd Edlinger  <bernd.edlinger%hotmail.de@localhost>
+
+        * Make-lang.in: Invoke gperf with -L C++.
+        * cfns.gperf: Remove prototypes for hash and libc_name_p
+        inlines.
+        * cfns.h: Regenerated.
+        * except.c (nothrow_libfn_p): Adjust.
+
+--- gcc/cp/Make-lang.in.orig   2013-01-10 20:38:27.000000000 +0000
++++ gcc/cp/Make-lang.in
+@@ -115,7 +115,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+-      gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++      gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+               $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+ 
+ #
diff -r 18179a903f35 -r 6abe8d74042c lang/gcc48/patches/patch-gcc_cp_cfns.gperf
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc48/patches/patch-gcc_cp_cfns.gperf        Wed Jun 27 10:07:07 2018 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-gcc_cp_cfns.gperf,v 1.1 2018/06/27 10:07:08 maya Exp $
+
+Backport upstream commit to fix build with newer GCC
+
+ 2016-02-19 Jakub Jelinek <jakub%redhat.com@localhost>
+
+            Bernd Edlinger  <bernd.edlinger%hotmail.de@localhost>
+
+        * Make-lang.in: Invoke gperf with -L C++.
+        * cfns.gperf: Remove prototypes for hash and libc_name_p
+        inlines.
+        * cfns.h: Regenerated.
+        * except.c (nothrow_libfn_p): Adjust.
+
+--- gcc/cp/cfns.gperf.orig     2013-01-10 20:38:27.000000000 +0000
++++ gcc/cp/cfns.gperf
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
+ 
+@@ -16,14 +18,6 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
diff -r 18179a903f35 -r 6abe8d74042c lang/gcc48/patches/patch-gcc_cp_cfns.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc48/patches/patch-gcc_cp_cfns.h    Wed Jun 27 10:07:07 2018 +0000
@@ -0,0 +1,85 @@
+$NetBSD: patch-gcc_cp_cfns.h,v 1.1 2018/06/27 10:07:08 maya Exp $
+
+Backport upstream commit to fix build with newer GCC
+
+ 2016-02-19 Jakub Jelinek <jakub%redhat.com@localhost>
+
+            Bernd Edlinger  <bernd.edlinger%hotmail.de@localhost>
+
+        * Make-lang.in: Invoke gperf with -L C++.
+        * cfns.gperf: Remove prototypes for hash and libc_name_p
+        inlines.
+        * cfns.h: Regenerated.
+        * except.c (nothrow_libfn_p): Adjust.
+
+--- gcc/cp/cfns.h.orig 2013-01-10 20:38:27.000000000 +0000
++++ gcc/cp/cfns.h
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf  */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf  */
+ 
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+       && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf%gnu.org@localhost>."
+ #endif
+ 
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+ 
+ /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
+ 
+@@ -47,25 +47,18 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+ 
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
++{
++private:
++  static inline unsigned int hash (const char *str, unsigned int len);
++public:
++  static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
+ {
+   static const unsigned short asso_values[] =
+     {
+@@ -122,14 +115,8 @@ hash (register const char *str, register
+   return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+ 
+-#ifdef __GNUC__
+-__inline
+-#ifdef __GNUC_STDC_INLINE__
+-__attribute__ ((__gnu_inline__))
+-#endif
+-#endif
+ const char *
+-libc_name_p (register const char *str, register unsigned int len)
++libc_name::libc_name_p (register const char *str, register unsigned int len)
+ {
+   enum
+     {
diff -r 18179a903f35 -r 6abe8d74042c lang/gcc48/patches/patch-gcc_cp_except.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc48/patches/patch-gcc_cp_except.c  Wed Jun 27 10:07:07 2018 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-gcc_cp_except.c,v 1.1 2018/06/27 10:07:08 maya Exp $
+
+Backport upstream commit to fix build with newer GCC
+
+ 2016-02-19 Jakub Jelinek <jakub%redhat.com@localhost>
+
+            Bernd Edlinger  <bernd.edlinger%hotmail.de@localhost>
+
+        * Make-lang.in: Invoke gperf with -L C++.
+        * cfns.gperf: Remove prototypes for hash and libc_name_p
+        inlines.
+        * cfns.h: Regenerated.
+        * except.c (nothrow_libfn_p): Adjust.
+
+--- gcc/cp/except.c.orig       2013-10-25 13:49:48.000000000 +0000
++++ gcc/cp/except.c
+@@ -1025,7 +1025,8 @@ nothrow_libfn_p (const_tree fn)
+      unless the system headers are playing rename tricks, and if
+      they are, we don't want to be confused by them.  */
+   id = DECL_NAME (fn);
+-  return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
++  return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
++                                 IDENTIFIER_LENGTH (id));
+ }
+ 
+ /* Returns nonzero if an exception of type FROM will be caught by a



Home | Main Index | Thread Index | Old Index