From 80cd0b8a52b5681d1d85e72b9e713d5b3b764d27 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 25 Nov 2021 22:07:24 +0000 Subject: 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 --- meta/recipes-devtools/gcc/gcc-11.2.inc | 1 - ...ation-fault-in-precompiled-header-generat.patch | 57 ---------------------- 2 files changed, 58 deletions(-) delete mode 100644 meta/recipes-devtools/gcc/gcc/0031-fix-segmentation-fault-in-precompiled-header-generat.patch 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 = "\ file://0028-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ file://0029-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ file://0030-sync-gcc-stddef.h-with-musl.patch \ - file://0031-fix-segmentation-fault-in-precompiled-header-generat.patch \ file://0033-Re-introduce-spe-commandline-options.patch \ file://0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ 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 @@ -From 3d59f763b824ac11f8360931092baf0bc1719562 Mon Sep 17 00:00:00 2001 -From: Juro Bystricky -Date: Mon, 19 Mar 2018 22:31:20 -0700 -Subject: [PATCH] fix segmentation fault in precompiled header generation - -Prevent a segmentation fault which occurs when using incorrect -structure trying to access name of some named operators, such as -CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in -those cases, as is may not be initialized at all. - -[YOCTO #11738] - -Upstream-Status: Pending - -Signed-off-by: Juro Bystricky -Signed-off-by: Khem Raj ---- - libcpp/lex.c | 26 +++++++++++++++++++++----- - 1 file changed, 21 insertions(+), 5 deletions(-) - -diff --git a/libcpp/lex.c b/libcpp/lex.c -index 06bcc31c87e..24bed9a35fa 100644 ---- a/libcpp/lex.c -+++ b/libcpp/lex.c -@@ -3531,11 +3531,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token, - spell_ident: - case SPELL_IDENT: - if (forstring) -- { -- memcpy (buffer, NODE_NAME (token->val.node.spelling), -- NODE_LEN (token->val.node.spelling)); -- buffer += NODE_LEN (token->val.node.spelling); -- } -+ { -+ if (token->type == CPP_NAME) -+ { -+ memcpy (buffer, NODE_NAME (token->val.node.spelling), -+ NODE_LEN (token->val.node.spelling)); -+ buffer += NODE_LEN (token->val.node.spelling); -+ break; -+ } -+ /* NAMED_OP, cannot use node.spelling */ -+ if (token->flags & NAMED_OP) -+ { -+ const char *str = cpp_named_operator2name (token->type); -+ if (str) -+ { -+ size_t len = strlen(str); -+ memcpy(buffer, str, len); -+ buffer += len; -+ } -+ break; -+ } -+ } - else - buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node); - break; -- cgit v1.2.3-54-g00ecf