gcc: Upgrade to 10.2.0

Drop 0036-Enable-CET-in-cross-compiler-if-possible.patch and
pr96130.patch they are already in 10.2

(From OE-Core rev: 35eda14fbdc38ae5e686c2d30a2c1d5569bd3088)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2020-08-16 00:08:13 -07:00
committed by Richard Purdie
parent 2d54561f74
commit a8fef8bee7
55 changed files with 7 additions and 265 deletions

View File

@@ -191,7 +191,7 @@ RECIPE_MAINTAINER_pn-gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem Raj <r
RECIPE_MAINTAINER_pn-gcc-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gcc-runtime = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gcc-sanitizers = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gcc-source-10.1.0 = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gcc-source-10.2.0 = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-gconf = "Ross Burton <ross.burton@arm.com>"
RECIPE_MAINTAINER_pn-gcr = "Alexander Kanavin <alex.kanavin@gmail.com>"
RECIPE_MAINTAINER_pn-gdb = "Khem Raj <raj.khem@gmail.com>"

View File

@@ -1,150 +0,0 @@
From 87a5ace658f2294b025e0420ef03ade1f45d926c Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Fri, 8 May 2020 06:11:05 -0700
Subject: [PATCH] Enable CET in cross compiler if possible
Don't perform CET run-time check for host when cross compiling. Instead,
enable CET in cross compiler if possible so that it will run on both CET
and non-CET hosts.
config/
PR bootstrap/94998
* cet.m4 (GCC_CET_HOST_FLAGS): Enable CET in cross compiler if
possible.
libiberty/
PR bootstrap/94998
* configure: Regenerated.
lto-plugin/
PR bootstrap/94998
* configure: Regenerated.
Upstream-Status: Submitted [https://patchwork.ozlabs.org/project/gcc/patch/20200508131105.170077-1-hjl.tools@gmail.com/]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
config/cet.m4 | 18 ++++++++++++------
libiberty/configure | 12 +++++++++---
lto-plugin/configure | 16 +++++++++++-----
3 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/config/cet.m4 b/config/cet.m4
index ea616b728a9..d9608699cd5 100644
--- a/config/cet.m4
+++ b/config/cet.m4
@@ -111,7 +111,8 @@ if test x$may_have_cet = xyes; then
fi
if test x$may_have_cet = xyes; then
- AC_TRY_RUN([
+ if test x$cross_compiling = xno; then
+ AC_TRY_RUN([
static void
foo (void)
{
@@ -137,12 +138,17 @@ main ()
bar ();
return 0;
}
- ],
- [have_cet=no],
- [have_cet=yes])
- if test x$enable_cet = xno -a x$have_cet = xyes; then
- AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
+ ],
+ [have_cet=no],
+ [have_cet=yes])
+ if test x$enable_cet = xno -a x$have_cet = xyes; then
+ AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
+ fi
fi
+else
+ # Enable CET in cross compiler if possible so that it will run on both
+ # CET and non-CET hosts.
+ have_cet=yes
fi
if test x$enable_cet = xyes; then
$1="-fcf-protection"
diff --git a/libiberty/configure b/libiberty/configure
index bb76cf1b823..3f82c5bb865 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5375,7 +5375,8 @@ rm -f core conftest.err conftest.$ac_objext \
fi
if test x$may_have_cet = xyes; then
- if test "$cross_compiling" = yes; then :
+ if test x$cross_compiling = xno; then
+ if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
@@ -5420,9 +5421,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- if test x$enable_cet = xno -a x$have_cet = xyes; then
- as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
+ if test x$enable_cet = xno -a x$have_cet = xyes; then
+ as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
+ fi
fi
+else
+ # Enable CET in cross compiler if possible so that it will run on both
+ # CET and non-CET hosts.
+ have_cet=yes
fi
if test x$enable_cet = xyes; then
CET_HOST_FLAGS="-fcf-protection"
diff --git a/lto-plugin/configure b/lto-plugin/configure
index 1baf6cc70b8..36c6ecc5875 100755
--- a/lto-plugin/configure
+++ b/lto-plugin/configure
@@ -5768,7 +5768,8 @@ rm -f core conftest.err conftest.$ac_objext \
fi
if test x$may_have_cet = xyes; then
- if test "$cross_compiling" = yes; then :
+ if test x$cross_compiling = xno; then
+ if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
@@ -5813,9 +5814,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- if test x$enable_cet = xno -a x$have_cet = xyes; then
- as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
+ if test x$enable_cet = xno -a x$have_cet = xyes; then
+ as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
+ fi
fi
+else
+ # Enable CET in cross compiler if possible so that it will run on both
+ # CET and non-CET hosts.
+ have_cet=yes
fi
if test x$enable_cet = xyes; then
CET_HOST_FLAGS="-fcf-protection"
@@ -11941,7 +11947,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11944 "configure"
+#line 11950 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12047,7 +12053,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12050 "configure"
+#line 12056 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@@ -1,106 +0,0 @@
From 0d03c0ee5213703ec6d9ffa632fa5298d83adaaa Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Mon, 13 Jul 2020 18:25:53 +0200
Subject: [PATCH] ipa-fnsummary: Fix ICE with switch predicates [PR96130]
The following testcase ICEs since r10-3199.
There is a switch with default label, where the controlling expression has
range just 0..7 and there are case labels for all those 8 values, but
nothing has yet optimized away the default.
Since r10-3199, set_switch_stmt_execution_predicate sets the switch to
default label's edge's predicate to a false predicate and then
compute_bb_predicates propagates the predicates through the cfg, but false
predicates aren't really added. The caller of compute_bb_predicates
in one place handles NULL bb->aux as false predicate:
if (fbi.info)
{
if (bb->aux)
bb_predicate = *(predicate *) bb->aux;
else
bb_predicate = false;
}
else
bb_predicate = true;
but then in two further spots that the patch below is changing
it assumes bb->aux must be non-NULL. Those two spots are guarded by a
condition that is only true if fbi.info is non-NULL, so I think the right
fix is to treat NULL aux as false predicate in those spots too.
2020-07-13 Jakub Jelinek <jakub@redhat.com>
PR ipa/96130
* ipa-fnsummary.c (analyze_function_body): Treat NULL bb->aux
as false predicate.
* gcc.dg/torture/pr96130.c: New test.
(cherry picked from commit 776e48e0931db69f158f40e5cb8e15463d879a42)
---
gcc/ipa-fnsummary.c | 10 ++++++++--
gcc/testsuite/gcc.dg/torture/pr96130.c | 26 ++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr96130.c
diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
index 045a0ecf766..55a0b272a96 100644
--- a/gcc/ipa-fnsummary.c
+++ b/gcc/ipa-fnsummary.c
@@ -2766,7 +2766,10 @@ analyze_function_body (struct cgraph_node *node, bool early)
edge ex;
unsigned int j;
class tree_niter_desc niter_desc;
- bb_predicate = *(predicate *) loop->header->aux;
+ if (loop->header->aux)
+ bb_predicate = *(predicate *) loop->header->aux;
+ else
+ bb_predicate = false;
exits = get_loop_exit_edges (loop);
FOR_EACH_VEC_ELT (exits, j, ex)
@@ -2799,7 +2802,10 @@ analyze_function_body (struct cgraph_node *node, bool early)
for (unsigned i = 0; i < loop->num_nodes; i++)
{
gimple_stmt_iterator gsi;
- bb_predicate = *(predicate *) body[i]->aux;
+ if (body[i]->aux)
+ bb_predicate = *(predicate *) body[i]->aux;
+ else
+ bb_predicate = false;
for (gsi = gsi_start_bb (body[i]); !gsi_end_p (gsi);
gsi_next (&gsi))
{
diff --git a/gcc/testsuite/gcc.dg/torture/pr96130.c b/gcc/testsuite/gcc.dg/torture/pr96130.c
new file mode 100644
index 00000000000..f722b9ad2a9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr96130.c
@@ -0,0 +1,26 @@
+/* PR ipa/96130 */
+/* { dg-do compile } */
+
+struct S { unsigned j : 3; };
+int k, l, m;
+
+void
+foo (struct S x)
+{
+ while (l != 5)
+ switch (x.j)
+ {
+ case 1:
+ case 3:
+ case 4:
+ case 6:
+ case 2:
+ case 5:
+ l = m;
+ case 7:
+ case 0:
+ k = 0;
+ default:
+ break;
+ }
+}
--
2.18.4

View File

@@ -2,13 +2,13 @@ require gcc-common.inc
# Third digit in PV should be incremented after a minor release
PV = "10.1.0"
PV = "10.2.0"
# BINV should be incremented to a revision after a minor gcc release
BINV = "10.1.0"
BINV = "10.2.0"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-10.1:${FILE_DIRNAME}/gcc-10.1/backport:"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
@@ -63,16 +63,14 @@ SRC_URI = "\
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 \
file://0036-Enable-CET-in-cross-compiler-if-possible.patch \
file://0037-mingw32-Enable-operation_not_supported.patch \
file://0038-libatomic-Do-not-enforce-march-on-aarch64.patch \
file://0036-mingw32-Enable-operation_not_supported.patch \
file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
file://0001-aarch64-New-Straight-Line-Speculation-SLS-mitigation.patch \
file://0002-aarch64-Introduce-SLS-mitigation-for-RET-and-BR-inst.patch \
file://0003-aarch64-Mitigate-SLS-for-BLR-instruction.patch \
file://pr96130.patch \
file://0001-aarch64-Fix-up-__aarch64_cas16_acq_rel-fallback.patch \
"
SRC_URI[sha256sum] = "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2"
SRC_URI[sha256sum] = "b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
# For dev release snapshotting