mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Merge bitcoin/bitcoin#30511: guix: GCC 12 consolidation
d1592d2eee
guix: use gcc-12 to compile winpthreads (fanquake)b23690e821
guix: use GCC 12.4.0 over 12.3.0 (fanquake)8b41ede55e
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 https://github.com/bitcoin/bitcoin/pull/30452#issuecomment-2244715566. ACKs for top commit: TheCharlatan: ACKd1592d2eee
hebasto: ACKd1592d2eee
. Tree-SHA512: e3aa1fa3e69500c93180e07cb4684661247ec6bc45245f746538d81406ff1d8777131590307496dda3287a112b6633e4991168586ca4c2036fa3a57b1efa9c87
This commit is contained in:
commit
ab8e05eb53
1 changed files with 21 additions and 11 deletions
|
@ -25,6 +25,7 @@
|
||||||
(guix build-system gnu)
|
(guix build-system gnu)
|
||||||
(guix build-system python)
|
(guix build-system python)
|
||||||
(guix build-system trivial)
|
(guix build-system trivial)
|
||||||
|
(guix download)
|
||||||
(guix gexp)
|
(guix gexp)
|
||||||
(guix git-download)
|
(guix git-download)
|
||||||
((guix licenses) #:prefix license:)
|
((guix licenses) #:prefix license:)
|
||||||
|
@ -91,7 +92,18 @@ chain for " target " development."))
|
||||||
(home-page (package-home-page xgcc))
|
(home-page (package-home-page xgcc))
|
||||||
(license (package-license xgcc)))))
|
(license (package-license xgcc)))))
|
||||||
|
|
||||||
(define base-gcc gcc-12)
|
(define base-gcc
|
||||||
|
(package
|
||||||
|
(inherit gcc-12) ;; 12.3.0
|
||||||
|
(version "12.4.0")
|
||||||
|
(source (origin
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "mirror://gnu/gcc/gcc-"
|
||||||
|
version "/gcc-" version ".tar.xz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0xcida8l2wykvvzvpcrcn649gj0ijn64gwxbplacpg6c0hk6akvh"))))))
|
||||||
|
|
||||||
(define base-linux-kernel-headers linux-libre-headers-6.1)
|
(define base-linux-kernel-headers linux-libre-headers-6.1)
|
||||||
|
|
||||||
(define* (make-bitcoin-cross-toolchain target
|
(define* (make-bitcoin-cross-toolchain target
|
||||||
|
@ -119,7 +131,10 @@ desirable for building Bitcoin Core release binaries."
|
||||||
(define (make-mingw-pthreads-cross-toolchain target)
|
(define (make-mingw-pthreads-cross-toolchain target)
|
||||||
"Create a cross-compilation toolchain package for TARGET"
|
"Create a cross-compilation toolchain package for TARGET"
|
||||||
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
|
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
|
||||||
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
|
(machine (substring target 0 (string-index target #\-)))
|
||||||
|
(pthreads-xlibc (make-mingw-w64 machine
|
||||||
|
#:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc))
|
||||||
|
#:with-winpthreads? #t))
|
||||||
(pthreads-xgcc (cross-gcc target
|
(pthreads-xgcc (cross-gcc target
|
||||||
#:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
|
#:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
|
||||||
#:xbinutils xbinutils
|
#:xbinutils xbinutils
|
||||||
|
@ -500,6 +515,7 @@ inspecting signatures in Mach-O binaries.")
|
||||||
gzip
|
gzip
|
||||||
xz
|
xz
|
||||||
;; Build tools
|
;; Build tools
|
||||||
|
gcc-toolchain-12
|
||||||
cmake-minimal
|
cmake-minimal
|
||||||
gnu-make
|
gnu-make
|
||||||
libtool
|
libtool
|
||||||
|
@ -515,22 +531,16 @@ inspecting signatures in Mach-O binaries.")
|
||||||
python-lief)
|
python-lief)
|
||||||
(let ((target (getenv "HOST")))
|
(let ((target (getenv "HOST")))
|
||||||
(cond ((string-suffix? "-mingw32" target)
|
(cond ((string-suffix? "-mingw32" target)
|
||||||
(list ;; Native GCC 12 toolchain
|
(list zip
|
||||||
gcc-toolchain-12
|
|
||||||
zip
|
|
||||||
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
|
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
|
||||||
nsis-x86_64
|
nsis-x86_64
|
||||||
nss-certs
|
nss-certs
|
||||||
osslsigncode))
|
osslsigncode))
|
||||||
((string-contains target "-linux-")
|
((string-contains target "-linux-")
|
||||||
(list ;; Native GCC 12 toolchain
|
(list (list gcc-toolchain-12 "static")
|
||||||
gcc-toolchain-12
|
|
||||||
(list gcc-toolchain-12 "static")
|
|
||||||
(make-bitcoin-cross-toolchain target)))
|
(make-bitcoin-cross-toolchain target)))
|
||||||
((string-contains target "darwin")
|
((string-contains target "darwin")
|
||||||
(list ;; Native GCC 11 toolchain
|
(list clang-toolchain-18
|
||||||
gcc-toolchain-11
|
|
||||||
clang-toolchain-18
|
|
||||||
lld-18
|
lld-18
|
||||||
(make-lld-wrapper lld-18 #:lld-as-ld? #t)
|
(make-lld-wrapper lld-18 #:lld-as-ld? #t)
|
||||||
python-signapple
|
python-signapple
|
||||||
|
|
Loading…
Add table
Reference in a new issue