diff options
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.9.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.9/0076-remove-prototypes-cfns.patch | 153 |
2 files changed, 154 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc b/meta/recipes-devtools/gcc/gcc-4.9.inc index 208e092e1d..64701c8e27 100644 --- a/meta/recipes-devtools/gcc/gcc-4.9.inc +++ b/meta/recipes-devtools/gcc/gcc-4.9.inc | |||
| @@ -91,6 +91,7 @@ SRC_URI = "\ | |||
| 91 | file://0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ | 91 | file://0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ |
| 92 | file://0074-fdebug-prefix-map-support-to-remap-relative-path.patch \ | 92 | file://0074-fdebug-prefix-map-support-to-remap-relative-path.patch \ |
| 93 | file://0075-libgcc-use-ldflags.patch \ | 93 | file://0075-libgcc-use-ldflags.patch \ |
| 94 | file://0076-remove-prototypes-cfns.patch \ | ||
| 94 | " | 95 | " |
| 95 | SRC_URI[md5sum] = "6f831b4d251872736e8e9cc09746f327" | 96 | SRC_URI[md5sum] = "6f831b4d251872736e8e9cc09746f327" |
| 96 | SRC_URI[sha256sum] = "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e" | 97 | SRC_URI[sha256sum] = "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e" |
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0076-remove-prototypes-cfns.patch b/meta/recipes-devtools/gcc/gcc-4.9/0076-remove-prototypes-cfns.patch new file mode 100644 index 0000000000..2954f2eac4 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.9/0076-remove-prototypes-cfns.patch | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | Upstream-Status: backport | ||
| 2 | |||
| 3 | From 8c3fa311caa86f61b4e28d1563d1110b44340fb2 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
| 5 | Date: Thu, 25 Feb 2016 15:36:41 +0000 | ||
| 6 | Subject: [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 | |||
| 26 | diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in | ||
| 27 | index bd1c1d7..a0ea0d4 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 | # | ||
| 39 | diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf | ||
| 40 | index 05ca753..d9b16b8 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-2014 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 | ||
| 64 | diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h | ||
| 65 | index c845ddf..65801d1 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-2014 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 | { | ||
| 137 | diff --git a/gcc/cp/except.c b/gcc/cp/except.c | ||
| 138 | index 221971a..32340f5 100644 | ||
| 139 | --- a/gcc/cp/except.c | ||
| 140 | +++ b/gcc/cp/except.c | ||
| 141 | @@ -1030,7 +1030,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 | -- | ||
| 152 | 2.8.2 | ||
| 153 | |||
