13.0.1-0.2

This commit is contained in:
Jakub Jelinek 2023-01-28 00:20:49 +01:00
parent 2e2b76f57a
commit dc4418df89
6 changed files with 73 additions and 137 deletions

2
.gitignore vendored
View File

@ -86,3 +86,5 @@
/gcc-13.0.0-20230112.tar.xz /gcc-13.0.0-20230112.tar.xz
/gcc-13.0.0-20230115.tar.xz /gcc-13.0.0-20230115.tar.xz
/gcc-13.0.1-20230117.tar.xz /gcc-13.0.1-20230117.tar.xz
/gcc-13.0.1-20230127.tar.xz
/newlib-cygwin-9e09d6ed83cce4777a5950412647ccc603040409.tar.xz

View File

@ -1,12 +1,12 @@
%global DATE 20230117 %global DATE 20230127
%global gitrev fedc064ac31b465edcfd22884b94bbdd05312224 %global gitrev 4faac89a6b542c0d94019eeadc333ef789f37c9d
%global gcc_version 13.0.1 %global gcc_version 13.0.1
%global gcc_major 13 %global gcc_major 13
# Note, gcc_release must be integer, if you want to add suffixes to # Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line. # %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 0 %global gcc_release 0
%global nvptx_tools_gitrev 472b6e78b3ba918d727698f79911360b7c808247 %global nvptx_tools_gitrev 472b6e78b3ba918d727698f79911360b7c808247
%global newlib_cygwin_gitrev a8526cb52bedabd4d6ba4b227a5185627f871aa1 %global newlib_cygwin_gitrev 9e09d6ed83cce4777a5950412647ccc603040409
%global _unpackaged_files_terminate_build 0 %global _unpackaged_files_terminate_build 0
%global _performance_build 1 %global _performance_build 1
# Hardening slows the compiler way too much. # Hardening slows the compiler way too much.
@ -136,7 +136,7 @@
Summary: Various compilers (C, C++, Objective-C, ...) Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc Name: gcc
Version: %{gcc_version} Version: %{gcc_version}
Release: %{gcc_release}.1%{?dist} Release: %{gcc_release}.2%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception. # GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@ -286,8 +286,7 @@ Patch8: gcc13-no-add-needed.patch
Patch9: gcc13-Wno-format-security.patch Patch9: gcc13-Wno-format-security.patch
Patch10: gcc13-rh1574936.patch Patch10: gcc13-rh1574936.patch
Patch11: gcc13-d-shared-libphobos.patch Patch11: gcc13-d-shared-libphobos.patch
Patch12: gcc13-pr107678.patch Patch12: gcc13-pr106746-revert.patch
Patch13: gcc13-pr108411.patch
Patch50: isl-rh2155127.patch Patch50: isl-rh2155127.patch
@ -862,8 +861,7 @@ so that there cannot be any synchronization problems.
%patch10 -p0 -b .rh1574936~ %patch10 -p0 -b .rh1574936~
%endif %endif
%patch11 -p0 -b .d-shared-libphobos~ %patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr107678~ %patch12 -p0 -b .pr106746-revert~
%patch13 -p0 -b .pr108411~
%patch50 -p0 -b .rh2155127~ %patch50 -p0 -b .rh2155127~
touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4 touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4

View File

@ -0,0 +1,63 @@
Revert:
[PR106746] drop cselib addr lookup in debug insn mem
The testcase used to get scheduled differently depending on the
presence of debug insns with MEMs. It's not clear to me why those
MEMs affected scheduling, but the cselib pre-canonicalization of the
MEM address is not used at all when analyzing debug insns, so the
memory allocation and lookup are pure waste. Somehow, avoiding that
waste fixes the problem, or makes it go latent.
2023-01-19 Alexandre Oliva <oliva@adacore.com>
PR debug/106746
* sched-deps.cc (sched_analyze_2): Skip cselib address lookup
within debug insns.
--- gcc/sched-deps.cc
+++ gcc/sched-deps.cc
@@ -2605,26 +2605,26 @@ sched_analyze_2 (class deps_desc *deps, rtx x, rtx_insn *insn)
case MEM:
{
- if (!DEBUG_INSN_P (insn))
- {
- /* Reading memory. */
- rtx_insn_list *u;
- rtx_insn_list *pending;
- rtx_expr_list *pending_mem;
- rtx t = x;
+ /* Reading memory. */
+ rtx_insn_list *u;
+ rtx_insn_list *pending;
+ rtx_expr_list *pending_mem;
+ rtx t = x;
- if (sched_deps_info->use_cselib)
- {
- machine_mode address_mode = get_address_mode (t);
-
- t = shallow_copy_rtx (t);
- cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1,
- GET_MODE (t), insn);
- XEXP (t, 0)
- = cselib_subst_to_values_from_insn (XEXP (t, 0), GET_MODE (t),
- insn);
- }
+ if (sched_deps_info->use_cselib)
+ {
+ machine_mode address_mode = get_address_mode (t);
+
+ t = shallow_copy_rtx (t);
+ cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1,
+ GET_MODE (t), insn);
+ XEXP (t, 0)
+ = cselib_subst_to_values_from_insn (XEXP (t, 0), GET_MODE (t),
+ insn);
+ }
+ if (!DEBUG_INSN_P (insn))
+ {
t = canon_rtx (t);
pending = deps->pending_read_insns;
pending_mem = deps->pending_read_mems;

View File

@ -1,113 +0,0 @@
A recent change only initializes the regs.how[] during Dwarf unwinding
which resulted in an uninitialized offset used in return address signing
and random failures during unwinding. The fix is to encode the return
address signing state in REG_UNSAVED and REG_UNDEFINED.
2023-01-10 Wilco Dijkstra <Wilco.Dijkstra@arm.com>
PR target/107678
* unwind-dw2.c (RA_SIGNED_BIT): Remove.
* unwind-dw2-execute_cfa.h: Use REG_UNSAVED/UNDEFINED
to encode return address signing state.
* config/aarch64/aarch64-unwind.h (aarch64_demangle_return_addr)
Check current return address signing state.
(aarch64_frob_update_contex): Remove.
--- libgcc/config/aarch64/aarch64-unwind.h
+++ libgcc/config/aarch64/aarch64-unwind.h
@@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define MD_DEMANGLE_RETURN_ADDR(context, fs, addr) \
aarch64_demangle_return_addr (context, fs, addr)
-#define MD_FROB_UPDATE_CONTEXT(context, fs) \
- aarch64_frob_update_context (context, fs)
static inline int
aarch64_cie_signed_with_b_key (struct _Unwind_Context *context)
@@ -55,42 +53,27 @@ aarch64_cie_signed_with_b_key (struct _Unwind_Context *context)
static inline void *
aarch64_demangle_return_addr (struct _Unwind_Context *context,
- _Unwind_FrameState *fs ATTRIBUTE_UNUSED,
+ _Unwind_FrameState *fs,
_Unwind_Word addr_word)
{
void *addr = (void *)addr_word;
- if (context->flags & RA_SIGNED_BIT)
+ const int reg = DWARF_REGNUM_AARCH64_RA_STATE;
+
+ if (fs->regs.how[reg] == REG_UNSAVED)
+ return addr;
+
+ /* Return-address signing state is toggled by DW_CFA_GNU_window_save (where
+ REG_UNDEFINED means enabled), or set by a DW_CFA_expression. */
+ if (fs->regs.how[reg] == REG_UNDEFINED
+ || (_Unwind_GetGR (context, reg) & 0x1) != 0)
{
_Unwind_Word salt = (_Unwind_Word) context->cfa;
if (aarch64_cie_signed_with_b_key (context) != 0)
return __builtin_aarch64_autib1716 (addr, salt);
return __builtin_aarch64_autia1716 (addr, salt);
}
- else
- return addr;
-}
-
-/* Do AArch64 private initialization on CONTEXT based on frame info FS. Mark
- CONTEXT as return address signed if bit 0 of DWARF_REGNUM_AARCH64_RA_STATE is
- set. */
-
-static inline void
-aarch64_frob_update_context (struct _Unwind_Context *context,
- _Unwind_FrameState *fs)
-{
- const int reg = DWARF_REGNUM_AARCH64_RA_STATE;
- int ra_signed;
- if (fs->regs.how[reg] == REG_UNSAVED)
- ra_signed = fs->regs.reg[reg].loc.offset & 0x1;
- else
- ra_signed = _Unwind_GetGR (context, reg) & 0x1;
- if (ra_signed)
- /* The flag is used for re-authenticating EH handler's address. */
- context->flags |= RA_SIGNED_BIT;
- else
- context->flags &= ~RA_SIGNED_BIT;
- return;
+ return addr;
}
#endif /* defined AARCH64_UNWIND_H && defined __ILP32__ */
--- libgcc/unwind-dw2.c
+++ libgcc/unwind-dw2.c
@@ -137,9 +137,6 @@ struct _Unwind_Context
#define SIGNAL_FRAME_BIT ((~(_Unwind_Word) 0 >> 1) + 1)
/* Context which has version/args_size/by_value fields. */
#define EXTENDED_CONTEXT_BIT ((~(_Unwind_Word) 0 >> 2) + 1)
- /* Bit reserved on AArch64, return address has been signed with A or B
- key. */
-#define RA_SIGNED_BIT ((~(_Unwind_Word) 0 >> 3) + 1)
_Unwind_Word flags;
/* 0 for now, can be increased when further fields are added to
struct _Unwind_Context. */
--- libgcc/unwind-dw2-execute_cfa.h 2023-01-02 17:53:56.003021412 +0100
+++ libgcc/unwind-dw2-execute_cfa.h 2023-01-12 19:52:05.456327742 +0100
@@ -278,10 +278,15 @@
case DW_CFA_GNU_window_save:
#if defined (__aarch64__) && !defined (__ILP32__)
/* This CFA is multiplexed with Sparc. On AArch64 it's used to toggle
- return address signing status. */
+ return address signing status. The REG_UNDEFINED/UNSAVED states
+ mean RA signing is enabled/disabled. */
reg = DWARF_REGNUM_AARCH64_RA_STATE;
- gcc_assert (fs->regs.how[reg] == REG_UNSAVED);
- fs->regs.reg[reg].loc.offset ^= 1;
+ gcc_assert (fs->regs.how[reg] == REG_UNSAVED
+ || fs->regs.how[reg] == REG_UNDEFINED);
+ if (fs->regs.how[reg] == REG_UNSAVED)
+ fs->regs.how[reg] = REG_UNDEFINED;
+ else
+ fs->regs.how[reg] = REG_UNSAVED;
#else
/* ??? Hardcoded for SPARC register window configuration. */
if (__LIBGCC_DWARF_FRAME_REGISTERS__ >= 32)

View File

@ -1,14 +0,0 @@
PR108411 workaround
--- gcc/config/aarch64/aarch64.cc 2023-01-15 13:20:00.569241815 +0100
+++ gcc/config/aarch64/aarch64.cc 2023-01-15 13:30:05.061513817 +0100
@@ -7707,8 +7707,7 @@ aarch64_layout_arg (cumulative_args_t pc
unsigned int alignment
= aarch64_function_arg_alignment (mode, type, &abi_break,
&abi_break_packed);
- gcc_assert (alignment <= 16 * BITS_PER_UNIT
- && (!alignment || abi_break < alignment)
+ gcc_assert ((!alignment || abi_break < alignment)
&& (!abi_break_packed || alignment < abi_break_packed));
pcum->aapcs_arg_processed = true;

View File

@ -1,4 +1,4 @@
SHA512 (gcc-13.0.1-20230117.tar.xz) = 22bc806162976c843cfeb43d24bb33e7961fedb402ec2c5e3ca2d02b9058825a1b37258b2dd9cfe14de02e5a4a00b2cf32c1e97375fc04265d6215de6a25d611 SHA512 (gcc-13.0.1-20230127.tar.xz) = 437494fad0d688d8c81d1bc6827bb139894fc74af4ca2d2a71dc7332304a988c4a358af38ffc15ab7c19fd5172398d00d6447301f560517d03a5367967694906
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
SHA512 (newlib-cygwin-a8526cb52bedabd4d6ba4b227a5185627f871aa1.tar.xz) = b099246fe4a5d0a372cdaee5da49083df5b2f4440a4e83961600cdf22d37da50c99ce9ae46b769f188a67034ee038cf863260988fc9d594e8e5fb3905a381dec SHA512 (newlib-cygwin-9e09d6ed83cce4777a5950412647ccc603040409.tar.xz) = bef3fa04f7b1a915fc1356ebed114698b5cc835e9fa04b0becff05a9efc76c59fb376482990873d222d7acdcfee3c4f30f5a4cb7f3be1f291f1fa5f1c7a9d983
SHA512 (nvptx-tools-472b6e78b3ba918d727698f79911360b7c808247.tar.xz) = 91690321bf96460c3b3e229199a6f752ed1c27c6933d4345dc7e237dc068f604ad211bb3a0373e14d4f332bee05b6227d6933e14e0b475ffdfea8b511ab735e6 SHA512 (nvptx-tools-472b6e78b3ba918d727698f79911360b7c808247.tar.xz) = 91690321bf96460c3b3e229199a6f752ed1c27c6933d4345dc7e237dc068f604ad211bb3a0373e14d4f332bee05b6227d6933e14e0b475ffdfea8b511ab735e6