diff --git a/mingw-w64-gcc/0021-Backport-patch-for-pr87137.patch b/mingw-w64-gcc/0021-Backport-patch-for-pr87137.patch new file mode 100644 index 0000000000..3230bb602b --- /dev/null +++ b/mingw-w64-gcc/0021-Backport-patch-for-pr87137.patch @@ -0,0 +1,31 @@ +--- a/gcc/stor-layout.c 2018/04/25 07:39:32 259630 ++++ b/gcc/stor-layout.c 2018/09/05 10:42:59 264123 +@@ -1685,14 +1685,21 @@ + { + rli->bitpos = size_binop (PLUS_EXPR, rli->bitpos, DECL_SIZE (field)); + +- /* If we ended a bitfield before the full length of the type then +- pad the struct out to the full length of the last type. */ +- if ((DECL_CHAIN (field) == NULL +- || TREE_CODE (DECL_CHAIN (field)) != FIELD_DECL) +- && DECL_BIT_FIELD_TYPE (field) ++ /* If FIELD is the last field and doesn't end at the full length ++ of the type then pad the struct out to the full length of the ++ last type. */ ++ if (DECL_BIT_FIELD_TYPE (field) + && !integer_zerop (DECL_SIZE (field))) +- rli->bitpos = size_binop (PLUS_EXPR, rli->bitpos, +- bitsize_int (rli->remaining_in_alignment)); ++ { ++ /* We have to scan, because non-field DECLS are also here. */ ++ tree probe = field; ++ while ((probe = DECL_CHAIN (probe))) ++ if (TREE_CODE (probe) == FIELD_DECL) ++ break; ++ if (!probe) ++ rli->bitpos = size_binop (PLUS_EXPR, rli->bitpos, ++ bitsize_int (rli->remaining_in_alignment)); ++ } + + normalize_rli (rli); + } diff --git a/mingw-w64-gcc/PKGBUILD b/mingw-w64-gcc/PKGBUILD index 28fe314b9b..7e46a3b24c 100644 --- a/mingw-w64-gcc/PKGBUILD +++ b/mingw-w64-gcc/PKGBUILD @@ -49,10 +49,11 @@ source=("https://ftp.gnu.org/gnu/gcc/${_realname}-${pkgver}/${_realname}-${pkgve 0011-Enable-shared-gnat-implib.patch 0014-clone_function_name_1-Retain-any-stdcall-suffix.patch 0019-gcc-8.2.0-Backport-patches-for-std-filesystem-from-master.patch + 0020-gcc-8.2.0-Backport-patches-for-std-variant-_M_destructive_move.patch + 0021-Backport-patch-for-pr87137.patch 0130-libstdc++-in-out.patch 0140-gcc-8.2.0-diagnostic-color.patch - 0300-ada-tools-build.patch - 0020-gcc-8.2.0-Backport-patches-for-std-variant-_M_destructive_move.patch) + 0300-ada-tools-build.patch) sha256sums=('196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080' 'SKIP' 'dea2bbad4967280910559c6a11b865aeec19cab34647fb5894cb498b24b14462' @@ -68,10 +69,11 @@ sha256sums=('196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080' '8faff8e503a617f283270f411399a8bcacda3ab62b4072dedf117e108af4844a' '60a58ed41389691a68ef4b7d47a0328df4d28d26e6c680a6b06b31191481ca65' '1a2309d027c3defd0257f50a3c82fa8d2b5ea825c9d880ed77ea8e43505112b2' + '7999073ba0827b1d61b3d60fed9efcf2f8f250997b9fcc865184f1c2fe2083dc' + '57b1a870ed5ac0b067f6b1dd114abe9f26dc28e1374fd0391da5683534b5c3ca' 'ba2f77db605577d08e4079f08a7a9556c975b5416be8610c5be31e915637feb7' 'e467f0ac68b349de826c79b00a45c5ad9e7c5a55d06b9b9fa7afd94c597f6376' - 'ecf58edd60509a1d0ba554ff4824c999fb22b449ea3649790588c1377e80f10b' - '7999073ba0827b1d61b3d60fed9efcf2f8f250997b9fcc865184f1c2fe2083dc') + 'ecf58edd60509a1d0ba554ff4824c999fb22b449ea3649790588c1377e80f10b') _threads="posix" @@ -115,7 +117,8 @@ prepare() { 0011-Enable-shared-gnat-implib.patch \ 0014-clone_function_name_1-Retain-any-stdcall-suffix.patch \ 0019-gcc-8.2.0-Backport-patches-for-std-filesystem-from-master.patch \ - 0020-gcc-8.2.0-Backport-patches-for-std-variant-_M_destructive_move.patch + 0020-gcc-8.2.0-Backport-patches-for-std-variant-_M_destructive_move.patch \ + 0021-Backport-patch-for-pr87137.patch apply_patch_with_msg \ 0130-libstdc++-in-out.patch