aboutsummaryrefslogtreecommitdiff
path: root/contrib/guix/manifest.scm
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-04-01 10:43:32 +0100
committerfanquake <fanquake@gmail.com>2022-04-04 10:48:33 +0100
commitdb8a5d60944dd565e15f4aba776a475972b4a9c9 (patch)
tree0cd3ab540516c6a77f7846692267e9d499e2fb52 /contrib/guix/manifest.scm
parente089c68aa17a5f605b295907e80dd355fef4f185 (diff)
downloadbitcoin-db8a5d60944dd565e15f4aba776a475972b4a9c9.tar.xz
guix: fix vmov alignment issues with gcc 10.3.0 & mingw-w64
This introduces a patch to our GCC (10.3.0) mingw-w64 compiler, in Guix, to make it avoid using aligned vmov instructions. This works around a longstanding issue in GCC, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412, which was recently discovered to be causing issues, see #24726. Note that distros like Debian are also patching around this issue, and that is where this patch comes from. This would also explain why we haven't run into this problem earlier, in development builds. See: https://salsa.debian.org/mingw-w64-team/gcc-mingw-w64/-/blob/master/debian/patches/vmov-alignment.patch. Fixes #24726. Alternative to #24727. See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939559 Github-Pull: #24736 Rebased-From: d6fae988eff78e28756d9b6219ec0239c420f51b
Diffstat (limited to 'contrib/guix/manifest.scm')
-rw-r--r--contrib/guix/manifest.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm
index 052c1066e2..5bf8949c37 100644
--- a/contrib/guix/manifest.scm
+++ b/contrib/guix/manifest.scm
@@ -166,13 +166,17 @@ desirable for building Bitcoin Core release binaries."
(define (make-gcc-without-newlib gcc)
(package-with-extra-configure-variable gcc "--with-newlib" "no"))
+(define (make-mingw-w64-cross-gcc-vmov-alignment cross-gcc)
+ (package-with-extra-patches cross-gcc
+ (search-our-patches "vmov-alignment.patch")))
+
(define (make-mingw-pthreads-cross-toolchain target)
"Create a cross-compilation toolchain package for TARGET"
(let* ((xbinutils (cross-binutils target))
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
(pthreads-xgcc (make-gcc-with-pthreads
(cross-gcc target
- #:xgcc (make-gcc-without-newlib (make-ssp-fixed-gcc base-gcc))
+ #:xgcc (make-gcc-without-newlib (make-ssp-fixed-gcc (make-mingw-w64-cross-gcc-vmov-alignment base-gcc)))
#:xbinutils xbinutils
#:libc pthreads-xlibc))))
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and