diff options
| author | Tim Orling <timothy.t.orling@linux.intel.com> | 2016-07-14 18:49:39 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-27 08:33:38 +0100 |
| commit | 37b3e44b9d182136529e2fb126249fd24702c0fa (patch) | |
| tree | b3adb5fcddd7aa3656251193089da2dcdd58c488 /meta/recipes-devtools | |
| parent | cb7787af8a7cfc06d06d931877f710145883efff (diff) | |
| download | poky-37b3e44b9d182136529e2fb126249fd24702c0fa.tar.gz | |
gcc-5.3: fix build for gcc-6
Backport upstream patch.
It had been applied to 4.9, but not 5.3.
[YOCTO #9897] (Fedora-24)
(From OE-Core rev: 41756d499f1c5ed57bcb7e3e8ab768ec020086f6)
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.3.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.3/0060-fix-build-when-using-gcc6.patch | 157 |
2 files changed, 158 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.3.inc b/meta/recipes-devtools/gcc/gcc-5.3.inc index d18ad79bad..4815384e94 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-fix-build-when-using-gcc6.patch \ | ||
| 92 | file://CVE-2016-4488.patch \ | 93 | file://CVE-2016-4488.patch \ |
| 93 | file://CVE-2016-4489.patch \ | 94 | file://CVE-2016-4489.patch \ |
| 94 | file://CVE-2016-2226.patch \ | 95 | file://CVE-2016-2226.patch \ |
diff --git a/meta/recipes-devtools/gcc/gcc-5.3/0060-fix-build-when-using-gcc6.patch b/meta/recipes-devtools/gcc/gcc-5.3/0060-fix-build-when-using-gcc6.patch new file mode 100644 index 0000000000..c093177a4e --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-5.3/0060-fix-build-when-using-gcc6.patch | |||
| @@ -0,0 +1,157 @@ | |||
| 1 | Upstream-Status: Backport | ||
| 2 | |||
| 3 | Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> | ||
| 4 | |||
| 5 | From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001 | ||
| 6 | From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
| 7 | Date: Thu, 25 Feb 2016 15:33:50 +0000 | ||
| 8 | Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de> | ||
| 9 | |||
| 10 | Backported from mainline | ||
| 11 | 2016-02-19 Jakub Jelinek <jakub@redhat.com> | ||
| 12 | Bernd Edlinger <bernd.edlinger@hotmail.de> | ||
| 13 | |||
| 14 | * Make-lang.in: Invoke gperf with -L C++. | ||
| 15 | * cfns.gperf: Remove prototypes for hash and libc_name_p | ||
| 16 | inlines. | ||
| 17 | * cfns.h: Regenerated. | ||
| 18 | * except.c (nothrow_libfn_p): Adjust. | ||
| 19 | |||
| 20 | |||
| 21 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
| 22 | |||
| 23 | Signed-off-by: Samuel Martin <s.martin49@gmail.com> | ||
| 24 | --- | ||
| 25 | gcc/cp/Make-lang.in | 2 +- | ||
| 26 | gcc/cp/cfns.gperf | 10 ++-------- | ||
| 27 | gcc/cp/cfns.h | 41 ++++++++++++++--------------------------- | ||
| 28 | gcc/cp/except.c | 3 ++- | ||
| 29 | 5 files changed, 31 insertions(+), 37 deletions(-) | ||
| 30 | |||
| 31 | diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in | ||
| 32 | index e98beb1..b09fb02 100644 | ||
| 33 | --- a/gcc/cp/Make-lang.in | ||
| 34 | +++ b/gcc/cp/Make-lang.in | ||
| 35 | @@ -111,7 +111,7 @@ else | ||
| 36 | # deleting the $(srcdir)/cp/cfns.h file. | ||
| 37 | $(srcdir)/cp/cfns.h: | ||
| 38 | endif | ||
| 39 | - gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ | ||
| 40 | + gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \ | ||
| 41 | $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h | ||
| 42 | |||
| 43 | # | ||
| 44 | diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf | ||
| 45 | index 68acd3d..214ecf6 100644 | ||
| 46 | --- a/gcc/cp/cfns.gperf | ||
| 47 | +++ b/gcc/cp/cfns.gperf | ||
| 48 | @@ -1,3 +1,5 @@ | ||
| 49 | +%language=C++ | ||
| 50 | +%define class-name libc_name | ||
| 51 | %{ | ||
| 52 | /* Copyright (C) 2000-2015 Free Software Foundation, Inc. | ||
| 53 | |||
| 54 | @@ -16,14 +18,6 @@ for more details. | ||
| 55 | You should have received a copy of the GNU General Public License | ||
| 56 | along with GCC; see the file COPYING3. If not see | ||
| 57 | <http://www.gnu.org/licenses/>. */ | ||
| 58 | -#ifdef __GNUC__ | ||
| 59 | -__inline | ||
| 60 | -#endif | ||
| 61 | -static unsigned int hash (const char *, unsigned int); | ||
| 62 | -#ifdef __GNUC__ | ||
| 63 | -__inline | ||
| 64 | -#endif | ||
| 65 | -const char * libc_name_p (const char *, unsigned int); | ||
| 66 | %} | ||
| 67 | %% | ||
| 68 | # The standard C library functions, for feeding to gperf; the result is used | ||
| 69 | diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h | ||
| 70 | index 1c6665d..596f413 100644 | ||
| 71 | --- a/gcc/cp/cfns.h | ||
| 72 | +++ b/gcc/cp/cfns.h | ||
| 73 | @@ -1,5 +1,5 @@ | ||
| 74 | -/* ANSI-C code produced by gperf version 3.0.3 */ | ||
| 75 | -/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */ | ||
| 76 | +/* C++ code produced by gperf version 3.0.4 */ | ||
| 77 | +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */ | ||
| 78 | |||
| 79 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ | ||
| 80 | && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ | ||
| 81 | @@ -28,7 +28,7 @@ | ||
| 82 | #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." | ||
| 83 | #endif | ||
| 84 | |||
| 85 | -#line 1 "cfns.gperf" | ||
| 86 | +#line 3 "cfns.gperf" | ||
| 87 | |||
| 88 | /* Copyright (C) 2000-2015 Free Software Foundation, Inc. | ||
| 89 | |||
| 90 | @@ -47,25 +47,18 @@ for more details. | ||
| 91 | You should have received a copy of the GNU General Public License | ||
| 92 | along with GCC; see the file COPYING3. If not see | ||
| 93 | <http://www.gnu.org/licenses/>. */ | ||
| 94 | -#ifdef __GNUC__ | ||
| 95 | -__inline | ||
| 96 | -#endif | ||
| 97 | -static unsigned int hash (const char *, unsigned int); | ||
| 98 | -#ifdef __GNUC__ | ||
| 99 | -__inline | ||
| 100 | -#endif | ||
| 101 | -const char * libc_name_p (const char *, unsigned int); | ||
| 102 | /* maximum key range = 391, duplicates = 0 */ | ||
| 103 | |||
| 104 | -#ifdef __GNUC__ | ||
| 105 | -__inline | ||
| 106 | -#else | ||
| 107 | -#ifdef __cplusplus | ||
| 108 | -inline | ||
| 109 | -#endif | ||
| 110 | -#endif | ||
| 111 | -static unsigned int | ||
| 112 | -hash (register const char *str, register unsigned int len) | ||
| 113 | +class libc_name | ||
| 114 | +{ | ||
| 115 | +private: | ||
| 116 | + static inline unsigned int hash (const char *str, unsigned int len); | ||
| 117 | +public: | ||
| 118 | + static const char *libc_name_p (const char *str, unsigned int len); | ||
| 119 | +}; | ||
| 120 | + | ||
| 121 | +inline unsigned int | ||
| 122 | +libc_name::hash (register const char *str, register unsigned int len) | ||
| 123 | { | ||
| 124 | static const unsigned short asso_values[] = | ||
| 125 | { | ||
| 126 | @@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len) | ||
| 127 | return hval + asso_values[(unsigned char)str[len - 1]]; | ||
| 128 | } | ||
| 129 | |||
| 130 | -#ifdef __GNUC__ | ||
| 131 | -__inline | ||
| 132 | -#ifdef __GNUC_STDC_INLINE__ | ||
| 133 | -__attribute__ ((__gnu_inline__)) | ||
| 134 | -#endif | ||
| 135 | -#endif | ||
| 136 | const char * | ||
| 137 | -libc_name_p (register const char *str, register unsigned int len) | ||
| 138 | +libc_name::libc_name_p (register const char *str, register unsigned int len) | ||
| 139 | { | ||
| 140 | enum | ||
| 141 | { | ||
| 142 | diff --git a/gcc/cp/except.c b/gcc/cp/except.c | ||
| 143 | index 3ff1ce6..2f2e396 100644 | ||
| 144 | --- a/gcc/cp/except.c | ||
| 145 | +++ b/gcc/cp/except.c | ||
| 146 | @@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn) | ||
| 147 | unless the system headers are playing rename tricks, and if | ||
| 148 | they are, we don't want to be confused by them. */ | ||
| 149 | id = DECL_NAME (fn); | ||
| 150 | - return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id)); | ||
| 151 | + return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id), | ||
| 152 | + IDENTIFIER_LENGTH (id)); | ||
| 153 | } | ||
| 154 | |||
| 155 | /* Returns nonzero if an exception of type FROM will be caught by a | ||
| 156 | -- | ||
| 157 | 1.7.1 | ||
