summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.3.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-5.3/0060-remove-prototypes-cfns.patch153
2 files changed, 154 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.3.inc b/meta/recipes-devtools/gcc/gcc-5.3.inc
index 118ddb9dd4..897c1f9a75 100644
--- a/meta/recipes-devtools/gcc/gcc-5.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-5.3.inc
@@ -89,6 +89,7 @@ SRC_URI = "\
89 file://0057-unwind-fix-for-musl.patch \ 89 file://0057-unwind-fix-for-musl.patch \
90 file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \ 90 file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \
91 file://0059-libgcc-use-ldflags.patch \ 91 file://0059-libgcc-use-ldflags.patch \
92 file://0060-remove-prototypes-cfns.patch \
92" 93"
93 94
94BACKPORTS = "" 95BACKPORTS = ""
diff --git a/meta/recipes-devtools/gcc/gcc-5.3/0060-remove-prototypes-cfns.patch b/meta/recipes-devtools/gcc/gcc-5.3/0060-remove-prototypes-cfns.patch
new file mode 100644
index 0000000000..2452b6f5c8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-5.3/0060-remove-prototypes-cfns.patch
@@ -0,0 +1,153 @@
1Upstream-Status: backport
2
3From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
4From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
5Date: Thu, 25 Feb 2016 15:33:50 +0000
6Subject: [PATCH] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
7
8 Backported from mainline
9 2016-02-19 Jakub Jelinek <jakub@redhat.com>
10 Bernd Edlinger <bernd.edlinger@hotmail.de>
11
12 * Make-lang.in: Invoke gperf with -L C++.
13 * cfns.gperf: Remove prototypes for hash and libc_name_p
14 inlines.
15 * cfns.h: Regenerated.
16 * except.c (nothrow_libfn_p): Adjust.
17
18
19---
20 gcc/cp/Make-lang.in | 2 +-
21 gcc/cp/cfns.gperf | 10 ++--------
22 gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
23 gcc/cp/except.c | 3 ++-
24 5 files changed, 31 insertions(+), 37 deletions(-)
25
26diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
27index e98beb1..b09fb02 100644
28--- a/gcc/cp/Make-lang.in
29+++ b/gcc/cp/Make-lang.in
30@@ -111,7 +111,7 @@ else
31 # deleting the $(srcdir)/cp/cfns.h file.
32 $(srcdir)/cp/cfns.h:
33 endif
34- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
35+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
36 $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
37
38 #
39diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
40index 68acd3d..214ecf6 100644
41--- a/gcc/cp/cfns.gperf
42+++ b/gcc/cp/cfns.gperf
43@@ -1,3 +1,5 @@
44+%language=C++
45+%define class-name libc_name
46 %{
47 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
48
49@@ -16,14 +18,6 @@ for more details.
50 You should have received a copy of the GNU General Public License
51 along with GCC; see the file COPYING3. If not see
52 <http://www.gnu.org/licenses/>. */
53-#ifdef __GNUC__
54-__inline
55-#endif
56-static unsigned int hash (const char *, unsigned int);
57-#ifdef __GNUC__
58-__inline
59-#endif
60-const char * libc_name_p (const char *, unsigned int);
61 %}
62 %%
63 # The standard C library functions, for feeding to gperf; the result is used
64diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
65index 1c6665d..596f413 100644
66--- a/gcc/cp/cfns.h
67+++ b/gcc/cp/cfns.h
68@@ -1,5 +1,5 @@
69-/* ANSI-C code produced by gperf version 3.0.3 */
70-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
71+/* C++ code produced by gperf version 3.0.4 */
72+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
73
74 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
75 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
76@@ -28,7 +28,7 @@
77 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
78 #endif
79
80-#line 1 "cfns.gperf"
81+#line 3 "cfns.gperf"
82
83 /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
84
85@@ -47,25 +47,18 @@ for more details.
86 You should have received a copy of the GNU General Public License
87 along with GCC; see the file COPYING3. If not see
88 <http://www.gnu.org/licenses/>. */
89-#ifdef __GNUC__
90-__inline
91-#endif
92-static unsigned int hash (const char *, unsigned int);
93-#ifdef __GNUC__
94-__inline
95-#endif
96-const char * libc_name_p (const char *, unsigned int);
97 /* maximum key range = 391, duplicates = 0 */
98
99-#ifdef __GNUC__
100-__inline
101-#else
102-#ifdef __cplusplus
103-inline
104-#endif
105-#endif
106-static unsigned int
107-hash (register const char *str, register unsigned int len)
108+class libc_name
109+{
110+private:
111+ static inline unsigned int hash (const char *str, unsigned int len);
112+public:
113+ static const char *libc_name_p (const char *str, unsigned int len);
114+};
115+
116+inline unsigned int
117+libc_name::hash (register const char *str, register unsigned int len)
118 {
119 static const unsigned short asso_values[] =
120 {
121@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
122 return hval + asso_values[(unsigned char)str[len - 1]];
123 }
124
125-#ifdef __GNUC__
126-__inline
127-#ifdef __GNUC_STDC_INLINE__
128-__attribute__ ((__gnu_inline__))
129-#endif
130-#endif
131 const char *
132-libc_name_p (register const char *str, register unsigned int len)
133+libc_name::libc_name_p (register const char *str, register unsigned int len)
134 {
135 enum
136 {
137diff --git a/gcc/cp/except.c b/gcc/cp/except.c
138index 3ff1ce6..2f2e396 100644
139--- a/gcc/cp/except.c
140+++ b/gcc/cp/except.c
141@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
142 unless the system headers are playing rename tricks, and if
143 they are, we don't want to be confused by them. */
144 id = DECL_NAME (fn);
145- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
146+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
147+ IDENTIFIER_LENGTH (id));
148 }
149
150 /* Returns nonzero if an exception of type FROM will be caught by a
151--
1522.8.2
153