Gentoo Archives: gentoo-commits

From: Michael Haubenwallner <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/, sys-devel/gcc/files/
Date: Mon, 25 Sep 2017 16:39:38
Message-Id: 1506357565.aedebf46c4e5e9c88097e000e7fc9133a5e51c3b.haubi@gentoo
1 commit: aedebf46c4e5e9c88097e000e7fc9133a5e51c3b
2 Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 25 16:39:25 2017 +0000
4 Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 25 16:39:25 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=aedebf46
7
8 sys-devel/gcc: build 5.3.0 with 7.1.0 host
9
10 Closes: https://bugs.gentoo.org/631976
11 Package-Manager: Portage-2.3.10-prefix, Repoman-2.3.3
12 RepoMan-Options: --force
13
14 sys-devel/gcc/files/gcc-5.3.0-libc_name_p.patch | 111 ++++++++++++++++++++++++
15 sys-devel/gcc/gcc-5.3.0.ebuild | 1 +
16 2 files changed, 112 insertions(+)
17
18 diff --git a/sys-devel/gcc/files/gcc-5.3.0-libc_name_p.patch b/sys-devel/gcc/files/gcc-5.3.0-libc_name_p.patch
19 new file mode 100644
20 index 0000000000..e87076b904
21 --- /dev/null
22 +++ b/sys-devel/gcc/files/gcc-5.3.0-libc_name_p.patch
23 @@ -0,0 +1,111 @@
24 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233572
25 +
26 +--- a/gcc/cp/Make-lang.in
27 ++++ b/gcc/cp/Make-lang.in
28 +@@ -111,7 +111,7 @@ else
29 + # deleting the $(srcdir)/cp/cfns.h file.
30 + $(srcdir)/cp/cfns.h:
31 + endif
32 +- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
33 ++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
34 + $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
35 +
36 + #
37 +--- a/gcc/cp/cfns.gperf
38 ++++ b/gcc/cp/cfns.gperf
39 +@@ -1,3 +1,5 @@
40 ++%language=C++
41 ++%define class-name libc_name
42 + %{
43 + /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
44 +
45 +@@ -16,14 +18,6 @@ for more details.
46 + You should have received a copy of the GNU General Public License
47 + along with GCC; see the file COPYING3. If not see
48 + <http://www.gnu.org/licenses/>. */
49 +-#ifdef __GNUC__
50 +-__inline
51 +-#endif
52 +-static unsigned int hash (const char *, unsigned int);
53 +-#ifdef __GNUC__
54 +-__inline
55 +-#endif
56 +-const char * libc_name_p (const char *, unsigned int);
57 + %}
58 + %%
59 + # The standard C library functions, for feeding to gperf; the result is used
60 +--- a/gcc/cp/cfns.h
61 ++++ b/gcc/cp/cfns.h
62 +@@ -28,7 +28,7 @@
63 + #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@×××.org>."
64 + #endif
65 +
66 +-#line 1 "cfns.gperf"
67 ++#line 3 "cfns.gperf"
68 +
69 + /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
70 +
71 +@@ -47,25 +47,18 @@ for more details.
72 + You should have received a copy of the GNU General Public License
73 + along with GCC; see the file COPYING3. If not see
74 + <http://www.gnu.org/licenses/>. */
75 +-#ifdef __GNUC__
76 +-__inline
77 +-#endif
78 +-static unsigned int hash (const char *, unsigned int);
79 +-#ifdef __GNUC__
80 +-__inline
81 +-#endif
82 +-const char * libc_name_p (const char *, unsigned int);
83 + /* maximum key range = 391, duplicates = 0 */
84 +
85 +-#ifdef __GNUC__
86 +-__inline
87 +-#else
88 +-#ifdef __cplusplus
89 +-inline
90 +-#endif
91 +-#endif
92 +-static unsigned int
93 +-hash (register const char *str, register unsigned int len)
94 ++class libc_name
95 ++{
96 ++private:
97 ++ static inline unsigned int hash (const char *str, unsigned int len);
98 ++public:
99 ++ static const char *libc_name_p (const char *str, unsigned int len);
100 ++};
101 ++
102 ++inline unsigned int
103 ++libc_name::hash (register const char *str, register unsigned int len)
104 + {
105 + static const unsigned short asso_values[] =
106 + {
107 +@@ -122,14 +115,8 @@ hash (register const char *str, register
108 + return hval + asso_values[(unsigned char)str[len - 1]];
109 + }
110 +
111 +-#ifdef __GNUC__
112 +-__inline
113 +-#ifdef __GNUC_STDC_INLINE__
114 +-__attribute__ ((__gnu_inline__))
115 +-#endif
116 +-#endif
117 + const char *
118 +-libc_name_p (register const char *str, register unsigned int len)
119 ++libc_name::libc_name_p (register const char *str, register unsigned int len)
120 + {
121 + enum
122 + {
123 +--- a/gcc/cp/except.c
124 ++++ b/gcc/cp/except.c
125 +@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
126 + unless the system headers are playing rename tricks, and if
127 + they are, we don't want to be confused by them. */
128 + id = DECL_NAME (fn);
129 +- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
130 ++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
131 ++ IDENTIFIER_LENGTH (id));
132 + }
133 +
134 + /* Returns nonzero if an exception of type FROM will be caught by a
135
136 diff --git a/sys-devel/gcc/gcc-5.3.0.ebuild b/sys-devel/gcc/gcc-5.3.0.ebuild
137 index b93e50955f..ad35214117 100644
138 --- a/sys-devel/gcc/gcc-5.3.0.ebuild
139 +++ b/sys-devel/gcc/gcc-5.3.0.ebuild
140 @@ -62,6 +62,7 @@ src_prepare() {
141 # make sure 64-bits native targets don't screw up the linker paths
142 #epatch "${FILESDIR}"/4.7.1/solaris-searchpath.patch
143 epatch "${FILESDIR}"/no-libs-for-startfile.patch
144 + epatch "${FILESDIR}"/${P}-libc_name_p.patch #631976
145 if use prefix; then
146 epatch "${FILESDIR}"/4.5.2/prefix-search-dirs.patch
147 # try /usr/lib32 in 32bit profile on x86_64-linux (needs