diff --git a/mingw-w64-gcc/0202-backport-2939b35.patch b/mingw-w64-gcc/0202-backport-2939b35.patch new file mode 100644 index 0000000000000..d3f57a30cb132 --- /dev/null +++ b/mingw-w64-gcc/0202-backport-2939b35.patch @@ -0,0 +1,40 @@ +From 2939b358936bb824330888def98ad848dea41483 Mon Sep 17 00:00:00 2001 +From: Eric Botcazou +Date: Wed, 3 Mar 2021 12:25:03 +0100 +Subject: [PATCH] Fix ICE with pathologically large frames + +gcc/ + PR target/99234 + * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target, + point back the hard frame pointer to its default location when the + frame is larger than SEH_MAX_FRAME_SIZE. +--- + gcc/config/i386/i386.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 7b803661366..e23f92b58cc 100644 +--- a/gcc/config/i386/i386.c ++++ b/gcc/config/i386/i386.c +@@ -6357,7 +6357,8 @@ ix86_compute_frame_layout (void) + frame->hard_frame_pointer_offset = frame->sse_reg_save_offset; + + /* If we can leave the frame pointer where it is, do so. Also, return +- the establisher frame for __builtin_frame_address (0). */ ++ the establisher frame for __builtin_frame_address (0) or else if the ++ frame overflows the SEH maximum frame size. */ + const HOST_WIDE_INT diff + = frame->stack_pointer_offset - frame->hard_frame_pointer_offset; + if (diff <= 255) +@@ -6375,6 +6376,8 @@ ix86_compute_frame_layout (void) + frame that is addressable with 8-bit offsets. */ + frame->hard_frame_pointer_offset = frame->stack_pointer_offset - 128; + } ++ else ++ frame->hard_frame_pointer_offset = frame->hfp_save_offset; + } + } + +-- +2.27.0 + diff --git a/mingw-w64-gcc/PKGBUILD b/mingw-w64-gcc/PKGBUILD index d03c937d79b64..7984890efe741 100644 --- a/mingw-w64-gcc/PKGBUILD +++ b/mingw-w64-gcc/PKGBUILD @@ -24,7 +24,7 @@ pkgver=10.2.0 #_majorver=${pkgver:0:1} #_sourcedir=${_realname}-${_majorver}-${_snapshot} _sourcedir=${_realname}-${pkgver} -pkgrel=7 +pkgrel=8 pkgdesc="GCC for the MinGW-w64" arch=('any') url="https://gcc.gnu.org" @@ -72,7 +72,8 @@ source=("https://ftp.gnu.org/gnu/gcc/${_realname}-${pkgver%%+*}/${_realname}-${p 0150-gcc-10.2.0-libgcc-ldflags.patch 0160-libbacktrace-seh.patch 0200-backport-7fc0f78.patch - 0201-backport-49a714e.patch) + 0201-backport-49a714e.patch + 0202-backport-2939b35.patch) sha256sums=('b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c' 'SKIP' 'bce81824fc89e5e62cca350de4c17a27e27a18a1a1ad5ca3492aec1fc5af3234' @@ -98,7 +99,8 @@ sha256sums=('b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c' '7f0b4e45d933e18c9d8bd2afcd83e4f52e97e2e25dd41bfa0cba755c70e591c7' '88c1d65e763e631ad49f9a077ed631f4acac9ef4732e2818ccddaefc883b1811' '90b0f1aae2e2f9d75520569e8fbb31a9bac507136dd103a966f063d28e2094b8' - '6bcaf2846ceeafa87912b30ed3e573d75b35bbeafebdaf675e2318b9b0058fbb') + '6bcaf2846ceeafa87912b30ed3e573d75b35bbeafebdaf675e2318b9b0058fbb' + '319b1ffe9dbede0578ffa4fd78fe803bf40ed1e0bc52251fdaaadd869f0dbf2a') validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org 86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com 13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com @@ -172,6 +174,10 @@ prepare() { apply_patch_with_msg \ 0201-backport-49a714e.patch + # https://github.com/msys2/MINGW-packages/issues/8079 + apply_patch_with_msg \ + 0202-backport-2939b35.patch + # do not expect ${prefix}/mingw symlink - this should be superceded by # 0005-Windows-Don-t-ignore-native-system-header-dir.patch .. but isn't! sed -i 's/${prefix}\/mingw\//${prefix}\//g' configure