diff --git a/ci-build.sh b/ci-build.sh index bfb16c5ad..de24ce9f0 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -63,7 +63,7 @@ export PKGEXT='.pkg.tar.xz' for package in "${packages[@]}"; do execute 'Building binary' makepkg-mingw --noconfirm --noprogressbar --skippgpcheck --syncdeps --rmdeps --cleanbuild - MINGW_ARCH=mingw64 execute 'Building source' makepkg-mingw --noconfirm --noprogressbar --allsource + MINGW_ARCH=mingw64 execute 'Building source' makepkg-mingw --noconfirm --noprogressbar --skippgpcheck --allsource execute 'List output contents' ls -ltr execute 'Installing' yes:pacman --noprogressbar --upgrade *.pkg.tar.xz execute 'Checking Binaries' find ./pkg -regex ".*\.\(exe\|dll\|a\|pc\)" diff --git a/mingw-w64-gcc/0150-libbacktrace-seh.patch b/mingw-w64-gcc/0150-libbacktrace-seh.patch new file mode 100644 index 000000000..7b2b5b44e --- /dev/null +++ b/mingw-w64-gcc/0150-libbacktrace-seh.patch @@ -0,0 +1,23 @@ +libgcc/Changelog: + * unwind-seh.c (_Unwind_Backtrace): Set the ra and cfa pointers + before calling the callback. +--- + libgcc/unwind-seh.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libgcc/unwind-seh.c b/libgcc/unwind-seh.c +index 1a70180cfaa..275d782903a 100644 +--- a/libgcc/unwind-seh.c ++++ b/libgcc/unwind-seh.c +@@ -466,6 +466,11 @@ _Unwind_Backtrace(_Unwind_Trace_Fn trace, + &gcc_context.disp->HandlerData, + &gcc_context.disp->EstablisherFrame, NULL); + ++ /* Set values that the callback can inspect via _Unwind_GetIP ++ * and _Unwind_GetCFA. */ ++ gcc_context.ra = ms_context.Rip; ++ gcc_context.cfa = ms_context.Rsp; ++ + /* Call trace function. */ + if (trace (&gcc_context, trace_argument) != _URC_NO_REASON) + return _URC_FATAL_PHASE1_ERROR; diff --git a/mingw-w64-gcc/PKGBUILD b/mingw-w64-gcc/PKGBUILD index 4cbe82f0c..8694a5589 100644 --- a/mingw-w64-gcc/PKGBUILD +++ b/mingw-w64-gcc/PKGBUILD @@ -2,6 +2,7 @@ # Contributor: Alexey Borzenkov # Contributor: Ray Donnelly # Contributor: Renato Silva +# Contributor: Kirill Müller # Rtools: Jeroen Ooms _realname=gcc @@ -11,7 +12,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=8.3.0 _srcver=8.3.0 #_srcver=8.3.0-RC-20190215 -pkgrel=9501 +pkgrel=9502 pkgdesc="GCC for the MinGW-w64" arch=('any') url="https://gcc.gnu.org" @@ -49,7 +50,8 @@ source=("https://ftp.gnu.org/gnu/gcc/${_realname}-${pkgver}/${_realname}-${pkgve 0019-gcc-8-branch-Backport-patches-for-std-filesystem-from-master.patch 0130-libstdc++-in-out.patch 0140-gcc-8.2.0-diagnostic-color.patch - pr88568.patch) + pr88568.patch + 0150-libbacktrace-seh.patch) sha256sums=('ea71adc1c3d86330874b8df19611424b143308f0d6612d542472600532c96d2d' 'SKIP' 'dea2bbad4967280910559c6a11b865aeec19cab34647fb5894cb498b24b14462' @@ -67,7 +69,8 @@ sha256sums=('ea71adc1c3d86330874b8df19611424b143308f0d6612d542472600532c96d2d' 'bf83cbc79de4c86f02664c8a624e26b12f570e3c31116fc7c46ecf655696f9a6' 'ba2f77db605577d08e4079f08a7a9556c975b5416be8610c5be31e915637feb7' 'e467f0ac68b349de826c79b00a45c5ad9e7c5a55d06b9b9fa7afd94c597f6376' - '4bbcb71f7e9e25af641e7abcb12ea4cd7a5ade3a82739414c65259afcbf21256') + '4bbcb71f7e9e25af641e7abcb12ea4cd7a5ade3a82739414c65259afcbf21256' + '88c1d65e763e631ad49f9a077ed631f4acac9ef4732e2818ccddaefc883b1811') _threads="posix" @@ -125,6 +128,11 @@ prepare() { apply_patch_with_msg \ pr88568.patch + # ensure libbacktrace works with SEH + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96948 + apply_patch_with_msg \ + 0150-libbacktrace-seh.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