wok-current view gcc49/stuff/build_with_gcc6.patch @ rev 25605

Fix gcc49 to be build with new toolchain
author Stanislas Leduc <shann@slitaz.org>
date Fri Sep 01 21:10:48 2023 +0000 (12 months ago)
parents
children
line source
1 From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
2 From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Thu, 25 Feb 2016 15:33:50 +0000
4 Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6 Backported from mainline
7 2016-02-19 Jakub Jelinek <jakub@redhat.com>
8 Bernd Edlinger <bernd.edlinger@hotmail.de>
10 * Make-lang.in: Invoke gperf with -L C++.
11 * cfns.gperf: Remove prototypes for hash and libc_name_p
12 inlines.
13 * cfns.h: Regenerated.
14 * except.c (nothrow_libfn_p): Adjust.
17 diff -urp gcc-4.9.2.org/gcc/cp/cfns.gperf gcc-4.9.2/gcc/cp/cfns.gperf
18 --- gcc-4.9.2.org/gcc/cp/cfns.gperf 2014-01-02 14:23:26.000000000 -0800
19 +++ gcc-4.9.2/gcc/cp/cfns.gperf 2017-05-16 15:36:40.148468967 -0700
20 @@ -1,3 +1,5 @@
21 +%language=C++
22 +%define class-name libc_name
23 %{
24 /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
26 @@ -16,14 +18,6 @@ for more details.
27 You should have received a copy of the GNU General Public License
28 along with GCC; see the file COPYING3. If not see
29 <http://www.gnu.org/licenses/>. */
30 -#ifdef __GNUC__
31 -__inline
32 -#endif
33 -static unsigned int hash (const char *, unsigned int);
34 -#ifdef __GNUC__
35 -__inline
36 -#endif
37 -const char * libc_name_p (const char *, unsigned int);
38 %}
39 %%
40 # The standard C library functions, for feeding to gperf; the result is used
41 Only in gcc-4.9.2/gcc/cp: cfns.gperf.orig
42 diff -urp gcc-4.9.2.org/gcc/cp/cfns.h gcc-4.9.2/gcc/cp/cfns.h
43 --- gcc-4.9.2.org/gcc/cp/cfns.h 2014-01-02 14:23:26.000000000 -0800
44 +++ gcc-4.9.2/gcc/cp/cfns.h 2017-05-16 15:36:40.152469452 -0700
45 @@ -1,5 +1,5 @@
46 -/* ANSI-C code produced by gperf version 3.0.3 */
47 -/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
48 +/* C++ code produced by gperf version 3.0.4 */
49 +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
51 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
52 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
53 @@ -28,7 +28,7 @@
54 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
55 #endif
57 -#line 1 "cfns.gperf"
58 +#line 3 "cfns.gperf"
60 /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
62 @@ -47,25 +47,18 @@ for more details.
63 You should have received a copy of the GNU General Public License
64 along with GCC; see the file COPYING3. If not see
65 <http://www.gnu.org/licenses/>. */
66 -#ifdef __GNUC__
67 -__inline
68 -#endif
69 -static unsigned int hash (const char *, unsigned int);
70 -#ifdef __GNUC__
71 -__inline
72 -#endif
73 -const char * libc_name_p (const char *, unsigned int);
74 /* maximum key range = 391, duplicates = 0 */
76 -#ifdef __GNUC__
77 -__inline
78 -#else
79 -#ifdef __cplusplus
80 -inline
81 -#endif
82 -#endif
83 -static unsigned int
84 -hash (register const char *str, register unsigned int len)
85 +class libc_name
86 +{
87 +private:
88 + static inline unsigned int hash (const char *str, unsigned int len);
89 +public:
90 + static const char *libc_name_p (const char *str, unsigned int len);
91 +};
92 +
93 +inline unsigned int
94 +libc_name::hash (register const char *str, register unsigned int len)
95 {
96 static const unsigned short asso_values[] =
97 {
98 @@ -122,14 +115,8 @@ hash (register const char *str, register
99 return hval + asso_values[(unsigned char)str[len - 1]];
100 }
102 -#ifdef __GNUC__
103 -__inline
104 -#ifdef __GNUC_STDC_INLINE__
105 -__attribute__ ((__gnu_inline__))
106 -#endif
107 -#endif
108 const char *
109 -libc_name_p (register const char *str, register unsigned int len)
110 +libc_name::libc_name_p (register const char *str, register unsigned int len)
111 {
112 enum
113 {
114 Only in gcc-4.9.2/gcc/cp: cfns.h.orig
115 diff -urp gcc-4.9.2.org/gcc/cp/except.c gcc-4.9.2/gcc/cp/except.c
116 --- gcc-4.9.2.org/gcc/cp/except.c 2014-01-02 14:23:26.000000000 -0800
117 +++ gcc-4.9.2/gcc/cp/except.c 2017-05-16 15:36:40.152469452 -0700
118 @@ -1030,7 +1030,8 @@ nothrow_libfn_p (const_tree fn)
119 unless the system headers are playing rename tricks, and if
120 they are, we don't want to be confused by them. */
121 id = DECL_NAME (fn);
122 - return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
123 + return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
124 + IDENTIFIER_LENGTH (id));
125 }
127 /* Returns nonzero if an exception of type FROM will be caught by a
128 Only in gcc-4.9.2/gcc/cp: except.c.orig
129 diff -urp gcc-4.9.2.org/gcc/cp/Make-lang.in gcc-4.9.2/gcc/cp/Make-lang.in
130 --- gcc-4.9.2.org/gcc/cp/Make-lang.in 2014-04-15 01:04:17.000000000 -0700
131 +++ gcc-4.9.2/gcc/cp/Make-lang.in 2017-05-16 15:36:40.152469452 -0700
132 @@ -111,7 +111,7 @@ else
133 # deleting the $(srcdir)/cp/cfns.h file.
134 $(srcdir)/cp/cfns.h:
135 endif
136 - gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
137 + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
138 $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
140 #
141 Only in gcc-4.9.2/gcc/cp: Make-lang.in.orig