diff --git a/mingw-w64-gcc/0022-fix-radix-sort-on-32bit-platforms.patch b/mingw-w64-gcc/0022-fix-radix-sort-on-32bit-platforms.patch deleted file mode 100644 index 43648adbd1..0000000000 --- a/mingw-w64-gcc/0022-fix-radix-sort-on-32bit-platforms.patch +++ /dev/null @@ -1,55 +0,0 @@ -From c7c22c10118d9f738ce60c97675def01c5e2d33d Mon Sep 17 00:00:00 2001 -From: Thomas Neumann -Date: Wed, 10 May 2023 12:33:49 +0200 -Subject: [PATCH] fix radix sort on 32bit platforms [PR109670] - -The radix sort uses two buffers, a1 for input and a2 for output. -After every digit the role of the two buffers is swapped. -When terminating the sort early the code made sure the output -was in a2. However, when we run out of bits, as can happen on -32bit platforms, the sorted result was in a1, was we had just -swapped a1 and a2. -This patch fixes the problem by unconditionally having a1 as -output after every loop iteration. - -This bug manifested itself only on 32bit platforms and even then -only in some circumstances, as it needs frames where a swap -is required due to differences in the top-most byte, which is -affected by ASLR. The new logic was validated by exhaustive -search over 32bit input values. - -libgcc/ChangeLog: - * unwind-dw2-fde.c: Fix radix sort buffer management. ---- - libgcc/unwind-dw2-fde.c | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/libgcc/unwind-dw2-fde.c b/libgcc/unwind-dw2-fde.c -index 7b74c391ced..31a3834156b 100644 ---- a/libgcc/unwind-dw2-fde.c -+++ b/libgcc/unwind-dw2-fde.c -@@ -624,8 +624,6 @@ fde_radixsort (struct object *ob, fde_extractor_t fde_extractor, - // Stop if we are already sorted. - if (!violations) - { -- // The sorted data is in a1 now. -- a2 = a1; - break; - } - -@@ -660,9 +658,9 @@ fde_radixsort (struct object *ob, fde_extractor_t fde_extractor, - #undef FANOUT - #undef FANOUTBITS - -- // The data is in a2 now, move in place if needed. -- if (a2 != v1->array) -- memcpy (v1->array, a2, sizeof (const fde *) * n); -+ // The data is in a1 now, move in place if needed. -+ if (a1 != v1->array) -+ memcpy (v1->array, a1, sizeof (const fde *) * n); - } - - static inline void --- -2.39.2 - diff --git a/mingw-w64-gcc/PKGBUILD b/mingw-w64-gcc/PKGBUILD index 0dd1ed4102..79a5ce457f 100644 --- a/mingw-w64-gcc/PKGBUILD +++ b/mingw-w64-gcc/PKGBUILD @@ -22,11 +22,11 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" $([[ "$_enable_jit" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-libgccjit") ) #_snapshot=20181214 -pkgver=13.1.0 +pkgver=13.2.0 #_majorver=${pkgver:0:1} #_sourcedir=${_realname}-${_majorver}-${_snapshot} _sourcedir=${_realname}-${pkgver} -pkgrel=7 +pkgrel=1 pkgdesc="GCC for the MinGW-w64" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64') @@ -64,7 +64,6 @@ source=("https://ftp.gnu.org/gnu/gcc/${_realname}-${pkgver%%+*}/${_realname}-${p 0014-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch 0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch 0021-PR14940-Allow-a-PCH-to-be-mapped-to-a-different-addr.patch - 0022-fix-radix-sort-on-32bit-platforms.patch 0140-gcc-diagnostic-color.patch 0200-add-m-no-align-vector-insn-option-for-i386.patch 0300-override-builtin-printf-format.patch @@ -72,7 +71,7 @@ source=("https://ftp.gnu.org/gnu/gcc/${_realname}-${pkgver%%+*}/${_realname}-${p 2001-fix-building-rust-on-mingw-w64.patch "2f7e7bfa3c6327793cdcdcb5c770b93cecd49bd0.patch::https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2f7e7bfa3c6327793cdcdcb5c770b93cecd49bd0" "3eeb4801d6f45f6250fc77a6d3ab4e0115f8cfdd.patch::https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=3eeb4801d6f45f6250fc77a6d3ab4e0115f8cfdd") -sha256sums=('61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86' +sha256sums=('e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da' 'SKIP' 'bce81824fc89e5e62cca350de4c17a27e27a18a1a1ad5ca3492aec1fc5af3234' '3fab890be4b0d4e9e309749c4de5ce00f069eee4fe6080baa100f768264e6218' @@ -86,7 +85,6 @@ sha256sums=('61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86' 'fd9bdecb2bbc4796bbc9f00b708dac42ef9e3464a06d6d27e5475cee117de5be' 'ad1f7b5e7afaaec008b7cbd14feea13a10989fa91bda7003af72d457619bb199' '6c272078340a27b3f147e497115b0a6e9fc0da720a2602f12b086524522caa59' - '45950ed7a6a14436bde40e717eef07160671bfbbf41c2251f95a3f8c660bef6b' 'e0a5b470f49a29f20215cc9f9d04c1cb9969dff6f0e546542799d3a693ef1c84' 'c34f9e71b5a092be1987ad4c65891742c74c9eb8ef6560100e751cd31375f579' 'f73c8d1701762fed7d8102d17d8e4416a4cc5e600e297a89c2e1fe09cd743a1c' @@ -162,10 +160,6 @@ prepare() { apply_patch_with_msg \ 2001-fix-building-rust-on-mingw-w64.patch - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109670#c12 - apply_patch_with_msg \ - 0022-fix-radix-sort-on-32bit-platforms.patch - # backport: https://github.com/msys2/MINGW-packages/issues/17599 # https://inbox.sourceware.org/gcc-patches/a22433f5-b4d2-19b7-86a2-31e2ee45fb61@martin.st/T/ apply_patch_with_msg \