diff options
author | maya <maya@pkgsrc.org> | 2018-06-27 10:07:07 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2018-06-27 10:07:07 +0000 |
commit | 420e64cb4371d4c1e6d62ae8dbf54ff6b4a6aa73 (patch) | |
tree | 588fa6b45d5668c2c0d434ee540c4f4340fb90b9 /lang/gcc48 | |
parent | 620359885f7b7a49fd620929f7054838ff1e8e05 (diff) | |
download | pkgsrc-420e64cb4371d4c1e6d62ae8dbf54ff6b4a6aa73.tar.gz |
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 (limited to 'lang/gcc48')
-rw-r--r-- | lang/gcc48/distinfo | 6 | ||||
-rw-r--r-- | lang/gcc48/patches/patch-gcc_cp_Make-lang.in | 25 | ||||
-rw-r--r-- | lang/gcc48/patches/patch-gcc_cp_cfns.gperf | 37 | ||||
-rw-r--r-- | lang/gcc48/patches/patch-gcc_cp_cfns.h | 85 | ||||
-rw-r--r-- | lang/gcc48/patches/patch-gcc_cp_except.c | 26 |
5 files changed, 178 insertions, 1 deletions
diff --git a/lang/gcc48/distinfo b/lang/gcc48/distinfo index 9791ce2d685..cba9d47249c 100644 --- a/lang/gcc48/distinfo +++ b/lang/gcc48/distinfo @@ -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_openbsd.opt) = 08b01bc4d7e171c3ee2ce5638a5859cff50c8ff8 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 --git a/lang/gcc48/patches/patch-gcc_cp_Make-lang.in b/lang/gcc48/patches/patch-gcc_cp_Make-lang.in new file mode 100644 index 00000000000..3f92fa0f71f --- /dev/null +++ b/lang/gcc48/patches/patch-gcc_cp_Make-lang.in @@ -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> + + Bernd Edlinger <bernd.edlinger@hotmail.de> + + * 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 --git a/lang/gcc48/patches/patch-gcc_cp_cfns.gperf b/lang/gcc48/patches/patch-gcc_cp_cfns.gperf new file mode 100644 index 00000000000..90e3ef5805f --- /dev/null +++ b/lang/gcc48/patches/patch-gcc_cp_cfns.gperf @@ -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> + + Bernd Edlinger <bernd.edlinger@hotmail.de> + + * 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 --git a/lang/gcc48/patches/patch-gcc_cp_cfns.h b/lang/gcc48/patches/patch-gcc_cp_cfns.h new file mode 100644 index 00000000000..1837bbf8d07 --- /dev/null +++ b/lang/gcc48/patches/patch-gcc_cp_cfns.h @@ -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> + + Bernd Edlinger <bernd.edlinger@hotmail.de> + + * 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>." + #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 --git a/lang/gcc48/patches/patch-gcc_cp_except.c b/lang/gcc48/patches/patch-gcc_cp_except.c new file mode 100644 index 00000000000..0a691cdbfe3 --- /dev/null +++ b/lang/gcc48/patches/patch-gcc_cp_except.c @@ -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> + + Bernd Edlinger <bernd.edlinger@hotmail.de> + + * 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 |