toolchain: gcc: updat to 13.2

Release Notes:
https://gcc.gnu.org/pipermail/gcc/2023-July/242148.html

Remove upstreamed patches:
- patches-13.x/001-rtl-optimization-109585-alias-analysis-typo.patch
- patches-13.x/700-RISCV-Inline-subword-atomic-ops.patch
- patches-13.x/701-riscv-linux-Don-t-add-latomic-with-pthread.patch

Refresh patches:
- patches-13.x/10-mbsd_multi.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Nick Hainke 2023-07-29 17:58:31 +02:00
parent 4a57e786a1
commit df47decd60
6 changed files with 4 additions and 2130 deletions

View File

@ -9,5 +9,5 @@ config GCC_VERSION_13
config GCC_VERSION
string
default "11.3.0" if GCC_VERSION_11
default "13.1.0" if GCC_VERSION_13
default "13.2.0" if GCC_VERSION_13
default "12.3.0"

View File

@ -37,8 +37,8 @@ ifeq ($(PKG_VERSION),12.3.0)
PKG_HASH:=949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b
endif
ifeq ($(PKG_VERSION),13.1.0)
PKG_HASH:=61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86
ifeq ($(PKG_VERSION),13.2.0)
PKG_HASH:=e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da
endif
PATCH_DIR=../patches-$(GCC_MAJOR_VERSION).x

View File

@ -1,69 +0,0 @@
From bb406a6aea336966681927a27f54ee89c4fd4ea1 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Mon, 24 Apr 2023 13:31:07 +0200
Subject: [PATCH] rtl-optimization/109585 - alias analysis typo
When r10-514-gc6b84edb6110dd2b4fb improved access path analysis
it introduced a typo that triggers when there's an access to a
trailing array in the first access path leading to false
disambiguation.
PR rtl-optimization/109585
* tree-ssa-alias.cc (aliasing_component_refs_p): Fix typo.
* gcc.dg/torture/pr109585.c: New testcase.
(cherry picked from commit 6d4bd27a60447c7505cb4783e675e98a191a8904)
---
gcc/testsuite/gcc.dg/torture/pr109585.c | 33 +++++++++++++++++++++++++
gcc/tree-ssa-alias.cc | 2 +-
2 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr109585.c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr109585.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+
+#include <stdlib.h>
+
+struct P {
+ long v;
+ struct P *n;
+};
+
+struct F {
+ long x;
+ struct P fam[];
+};
+
+int __attribute__((noipa))
+f(struct F *f, int i)
+{
+ struct P *p = f->fam;
+ asm("" : "+r"(f): "r"(p));
+ p->v = 0;
+ p->n = 0;
+ return f->fam->n != 0;
+}
+
+int
+main()
+{
+ struct F *m = malloc (sizeof (long) + 2 * sizeof (struct P));
+ m->fam[0].n = &m->fam[1];
+ if (f (m, 0))
+ abort ();
+ return 0;
+}
--- a/gcc/tree-ssa-alias.cc
+++ b/gcc/tree-ssa-alias.cc
@@ -1330,7 +1330,7 @@ aliasing_component_refs_p (tree ref1,
/* If we didn't find a common base, try the other way around. */
if (cmp_outer <= 0
|| (end_struct_ref1
- && compare_type_sizes (TREE_TYPE (end_struct_ref1), type1) <= 0))
+ && compare_type_sizes (TREE_TYPE (end_struct_ref1), type2) <= 0))
{
int res = aliasing_component_refs_walk (ref2, type2, base2,
offset2, max_size2,

View File

@ -1,36 +0,0 @@
From 203f3060dd363361b172f7295f42bb6bf5ac0b3b Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Sat, 23 Apr 2022 15:48:42 +0200
Subject: [PATCH] riscv/linux: Don't add -latomic with -pthread
Now that we have support for inline subword atomic operations, it is no
longer necessary to link against libatomic. This also fixes testsuite
failures because the framework does not properly set up the linker flags
for finding libatomic.
The use of atomic operations is also independent of the use of libpthread.
gcc/
* config/riscv/linux.h (LIB_SPEC): Don't redefine.
---
gcc/config/riscv/linux.h | 10 ----------
1 file changed, 10 deletions(-)
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.
#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
- others do not. So link libatomic by default, as needed. */
-#undef LIB_SPEC
-#ifdef LD_AS_NEEDED_OPTION
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
-#else
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
-#endif
-
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
#define CPP_SPEC "%{pthread:-D_REENTRANT}"

View File

@ -114,7 +114,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
; On SVR4 targets, it also controls whether or not to emit a
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -10062,6 +10062,17 @@ This option is only supported for C and
@@ -10065,6 +10065,17 @@ This option is only supported for C and
@option{-Wall} and by @option{-Wpedantic}, which can be disabled with
@option{-Wno-pointer-sign}.