summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-25 22:07:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-26 17:01:08 +0000
commit80cd0b8a52b5681d1d85e72b9e713d5b3b764d27 (patch)
tree7e5e64d104eb80cc4530f0f850d156e99a5f4869
parenta27bf13e89b0f8d7b3f427d380c763e14bab450a (diff)
downloadpoky-80cd0b8a52b5681d1d85e72b9e713d5b3b764d27.tar.gz
gcc: Drop further unneeded precompiled header patch
According to comments on the bug report from gcc developers, we no longer need to do this post gcc 10. Lets therefore drop the patch. (From OE-Core rev: 8ddc6f46d40cdcc462de23d1b1218f2ed9fd3d07) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-11.2.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch57
2 files changed, 0 insertions, 58 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-11.2.inc b/meta/recipes-devtools/gcc/gcc-11.2.inc
index afb8f2df5c..4c18396a15 100644
--- a/meta/recipes-devtools/gcc/gcc-11.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-11.2.inc
@@ -52,7 +52,6 @@ SRC_URI = "\
52 file://0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ 52 file://0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
53 file://0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ 53 file://0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
54 file://0030-sync-gcc-stddef.h-with-musl.patch \ 54 file://0030-sync-gcc-stddef.h-with-musl.patch \
55 file://0031-fix-segmentation-fault-in-precompiled-header-generat.patch \
56 file://0033-Re-introduce-spe-commandline-options.patch \ 55 file://0033-Re-introduce-spe-commandline-options.patch \
57 file://0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ 56 file://0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
58 file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \ 57 file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
diff --git a/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch b/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
deleted file mode 100644
index 70afa4f9e9..0000000000
--- a/meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 3d59f763b824ac11f8360931092baf0bc1719562 Mon Sep 17 00:00:00 2001
2From: Juro Bystricky <juro.bystricky@intel.com>
3Date: Mon, 19 Mar 2018 22:31:20 -0700
4Subject: [PATCH] fix segmentation fault in precompiled header generation
5
6Prevent a segmentation fault which occurs when using incorrect
7structure trying to access name of some named operators, such as
8CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in
9those cases, as is may not be initialized at all.
10
11[YOCTO #11738]
12
13Upstream-Status: Pending
14
15Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 libcpp/lex.c | 26 +++++++++++++++++++++-----
19 1 file changed, 21 insertions(+), 5 deletions(-)
20
21diff --git a/libcpp/lex.c b/libcpp/lex.c
22index 06bcc31c87e..24bed9a35fa 100644
23--- a/libcpp/lex.c
24+++ b/libcpp/lex.c
25@@ -3531,11 +3531,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token,
26 spell_ident:
27 case SPELL_IDENT:
28 if (forstring)
29- {
30- memcpy (buffer, NODE_NAME (token->val.node.spelling),
31- NODE_LEN (token->val.node.spelling));
32- buffer += NODE_LEN (token->val.node.spelling);
33- }
34+ {
35+ if (token->type == CPP_NAME)
36+ {
37+ memcpy (buffer, NODE_NAME (token->val.node.spelling),
38+ NODE_LEN (token->val.node.spelling));
39+ buffer += NODE_LEN (token->val.node.spelling);
40+ break;
41+ }
42+ /* NAMED_OP, cannot use node.spelling */
43+ if (token->flags & NAMED_OP)
44+ {
45+ const char *str = cpp_named_operator2name (token->type);
46+ if (str)
47+ {
48+ size_t len = strlen(str);
49+ memcpy(buffer, str, len);
50+ buffer += len;
51+ }
52+ break;
53+ }
54+ }
55 else
56 buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node);
57 break;