Skip to content

Commit ab8e05e

Browse files
committed
Merge bitcoin/bitcoin#30511: guix: GCC 12 consolidation
d1592d2 guix: use gcc-12 to compile winpthreads (fanquake) b23690e guix: use GCC 12.4.0 over 12.3.0 (fanquake) 8b41ede guix: consolidate back to GCC 12 toolchain for all HOSTS (fanquake) Pull request description: This PR contains 3 changes: * Bump GCC in Guix from [12.3.0 to 12.4.0](https://gcc.gnu.org/gcc-12/). A patch was sent upstream, https://lists.gnu.org/archive/html/guix-patches/2024-06/msg01025.html, but has not landed. * Consolidate all build environments back to using a GCC 12 toolchain. After #21778, the macOS environment is no-longer pinned to 11 (12 would otherwise cause issues building cctools). So, instead of requiring all builders to compile an additional GCC toolchain, use 12. * Use GCC 12 to compile winpthreads. Currently, GCC 11 is used; which became apparent in bitcoin/bitcoin#30452 (comment). ACKs for top commit: TheCharlatan: ACK d1592d2 hebasto: ACK d1592d2. Tree-SHA512: e3aa1fa3e69500c93180e07cb4684661247ec6bc45245f746538d81406ff1d8777131590307496dda3287a112b6633e4991168586ca4c2036fa3a57b1efa9c87
2 parents bee23ce + d1592d2 commit ab8e05e

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

contrib/guix/manifest.scm

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
(guix build-system gnu)
2626
(guix build-system python)
2727
(guix build-system trivial)
28+
(guix download)
2829
(guix gexp)
2930
(guix git-download)
3031
((guix licenses) #:prefix license:)
@@ -91,7 +92,18 @@ chain for " target " development."))
9192
(home-page (package-home-page xgcc))
9293
(license (package-license xgcc)))))
9394

94-
(define base-gcc gcc-12)
95+
(define base-gcc
96+
(package
97+
(inherit gcc-12) ;; 12.3.0
98+
(version "12.4.0")
99+
(source (origin
100+
(method url-fetch)
101+
(uri (string-append "mirror://gnu/gcc/gcc-"
102+
version "/gcc-" version ".tar.xz"))
103+
(sha256
104+
(base32
105+
"0xcida8l2wykvvzvpcrcn649gj0ijn64gwxbplacpg6c0hk6akvh"))))))
106+
95107
(define base-linux-kernel-headers linux-libre-headers-6.1)
96108

97109
(define* (make-bitcoin-cross-toolchain target
@@ -119,7 +131,10 @@ desirable for building Bitcoin Core release binaries."
119131
(define (make-mingw-pthreads-cross-toolchain target)
120132
"Create a cross-compilation toolchain package for TARGET"
121133
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
122-
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
134+
(machine (substring target 0 (string-index target #\-)))
135+
(pthreads-xlibc (make-mingw-w64 machine
136+
#:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc))
137+
#:with-winpthreads? #t))
123138
(pthreads-xgcc (cross-gcc target
124139
#:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
125140
#:xbinutils xbinutils
@@ -500,6 +515,7 @@ inspecting signatures in Mach-O binaries.")
500515
gzip
501516
xz
502517
;; Build tools
518+
gcc-toolchain-12
503519
cmake-minimal
504520
gnu-make
505521
libtool
@@ -515,22 +531,16 @@ inspecting signatures in Mach-O binaries.")
515531
python-lief)
516532
(let ((target (getenv "HOST")))
517533
(cond ((string-suffix? "-mingw32" target)
518-
(list ;; Native GCC 12 toolchain
519-
gcc-toolchain-12
520-
zip
534+
(list zip
521535
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
522536
nsis-x86_64
523537
nss-certs
524538
osslsigncode))
525539
((string-contains target "-linux-")
526-
(list ;; Native GCC 12 toolchain
527-
gcc-toolchain-12
528-
(list gcc-toolchain-12 "static")
540+
(list (list gcc-toolchain-12 "static")
529541
(make-bitcoin-cross-toolchain target)))
530542
((string-contains target "darwin")
531-
(list ;; Native GCC 11 toolchain
532-
gcc-toolchain-11
533-
clang-toolchain-18
543+
(list clang-toolchain-18
534544
lld-18
535545
(make-lld-wrapper lld-18 #:lld-as-ld? #t)
536546
python-signapple

0 commit comments

Comments
 (0)