Skip to content

Commit be97bfe

Browse files
91b7ef8 merge bitcoin#30438: build Linux GCC with --enable-cet (Kittywhiskers Van Gogh) cfc6cba partial bitcoin#30511: GCC 12 consolidation (Kittywhiskers Van Gogh) 06f5431 merge bitcoin#30231: bump time-machine to f0bb724211872cd6158fce6162e0b8c73efed126 (Kittywhiskers Van Gogh) 5b292ee merge bitcoin#29846: replace GCC unaligned VMOV patch with binutils patch (Kittywhiskers Van Gogh) 4d1f7dc merge bitcoin#29828: remove `gcc-toolchain static` from Windows build (Kittywhiskers Van Gogh) f321d3d merge bitcoin#29673: use GCC 11 in macOS build env (Kittywhiskers Van Gogh) d570e2d merge bitcoin#29695: build GCC with --enable-standard-branch-protection (Kittywhiskers Van Gogh) c965943 merge bitcoin#29651: bump time-machine to dc4842797bfdc5f9f3f5f725bf189c2b68bd6b5a (Kittywhiskers Van Gogh) 59a125a merge bitcoin#27897: use GCC 12.3.0 to build releases (Kittywhiskers Van Gogh) a701b06 merge bitcoin#29078: Bump guix time-machine to unlock riscv64 metal (Kittywhiskers Van Gogh) d4b10a3 merge bitcoin#28786: switch to 6.1 kernel headers over 5.15 (Kittywhiskers Van Gogh) c371870 merge bitcoin#28580: update time-machine (Kittywhiskers Van Gogh) d36c9b6 merge bitcoin#28759: update signapple to latest master (Kittywhiskers Van Gogh) 38c71d8 merge bitcoin#28370: remove GCC 10 workaround from NSIS (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * Dependent on dashpay#6382 * Dependency for dashpay#6384 ## Breaking Changes None expected ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 91b7ef8 Tree-SHA512: 0cfb436a430cf4b624a48a9928ecac9cd5c50e88e51ed04e7d1d0100968af8be1183364f035ac75153781a5e1616aa2f6fadabf0a1c03ec4b66dedea544b77ad
2 parents f155ecf + 91b7ef8 commit be97bfe

File tree

7 files changed

+78
-341
lines changed

7 files changed

+78
-341
lines changed

contrib/guix/guix-build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ mkdir -p "$VERSION_BASE"
7474
################
7575

7676
# Default to building for all supported HOSTs (overridable by environment)
77-
export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu powerpc64le-linux-gnu
77+
# powerpc64le-linux-gnu currently disabled due non-determinism issues across build arches.
78+
export HOSTS="${HOSTS:-x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv64-linux-gnu powerpc64-linux-gnu
7879
x86_64-w64-mingw32
7980
x86_64-apple-darwin arm64-apple-darwin}"
8081

contrib/guix/libexec/build.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ store_path() {
6363
# Set environment variables to point the NATIVE toolchain to the right
6464
# includes/libs
6565
NATIVE_GCC="$(store_path gcc-toolchain)"
66-
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
6766

6867
unset LIBRARY_PATH
6968
unset CPATH
@@ -72,12 +71,20 @@ unset CPLUS_INCLUDE_PATH
7271
unset OBJC_INCLUDE_PATH
7372
unset OBJCPLUS_INCLUDE_PATH
7473

75-
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
7674
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
7775
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
7876
export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include"
7977
export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
8078

79+
case "$HOST" in
80+
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
81+
*mingw*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
82+
*)
83+
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
84+
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC_STATIC}/lib"
85+
;;
86+
esac
87+
8188
# Set environment variables to point the CROSS toolchain to the right
8289
# includes/libs for $HOST
8390
case "$HOST" in

contrib/guix/libexec/prelude.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fi
5151
time-machine() {
5252
# shellcheck disable=SC2086
5353
guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
54-
--commit=160f78a4d92205df986ed9efcce7d3aac188cb24 \
54+
--commit=f0bb724211872cd6158fce6162e0b8c73efed126 \
5555
--cores="$JOBS" \
5656
--keep-failed \
5757
--fallback \

contrib/guix/manifest.scm

Lines changed: 44 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,22 @@
1313
(gnu packages gawk)
1414
(gnu packages gcc)
1515
((gnu packages installers) #:select (nsis-x86_64))
16-
((gnu packages linux) #:select (linux-libre-headers-5.15 util-linux))
16+
((gnu packages linux) #:select (linux-libre-headers-6.1 util-linux))
1717
(gnu packages llvm)
1818
(gnu packages mingw)
1919
(gnu packages moreutils)
2020
(gnu packages pkg-config)
2121
((gnu packages python) #:select (python-minimal))
2222
((gnu packages python-build) #:select (python-tomli))
2323
((gnu packages python-crypto) #:select (python-asn1crypto))
24-
((gnu packages python-web) #:select (python-requests))
24+
((gnu packages python-xyz) #:select (python-altgraph))
2525
((gnu packages tls) #:select (openssl))
2626
((gnu packages version-control) #:select (git-minimal))
2727
(guix build-system cmake)
2828
(guix build-system gnu)
2929
(guix build-system python)
3030
(guix build-system trivial)
31+
(guix download)
3132
(guix gexp)
3233
(guix git-download)
3334
((guix licenses) #:prefix license:)
@@ -94,8 +95,19 @@ chain for " target " development."))
9495
(home-page (package-home-page xgcc))
9596
(license (package-license xgcc)))))
9697

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

100112
(define* (make-bitcoin-cross-toolchain target
101113
#:key
@@ -113,13 +125,19 @@ desirable for building Dash Core release binaries."
113125

114126
(define (gcc-mingw-patches gcc)
115127
(package-with-extra-patches gcc
116-
(search-our-patches "gcc-remap-guix-store.patch"
117-
"vmov-alignment.patch")))
128+
(search-our-patches "gcc-remap-guix-store.patch")))
129+
130+
(define (binutils-mingw-patches binutils)
131+
(package-with-extra-patches binutils
132+
(search-our-patches "binutils-unaligned-default.patch")))
118133

119134
(define (make-mingw-pthreads-cross-toolchain target)
120135
"Create a cross-compilation toolchain package for TARGET"
121-
(let* ((xbinutils (cross-binutils target))
122-
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
136+
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
137+
(machine (substring target 0 (string-index target #\-)))
138+
(pthreads-xlibc (make-mingw-w64 machine
139+
#:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc))
140+
#:with-winpthreads? #t))
123141
(pthreads-xgcc (cross-gcc target
124142
#:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
125143
#:xbinutils xbinutils
@@ -143,10 +161,6 @@ chain for " target " development."))
143161
(home-page (package-home-page pthreads-xgcc))
144162
(license (package-license pthreads-xgcc)))))
145163

146-
(define (make-nsis-for-gcc-10 base-nsis)
147-
(package-with-extra-patches base-nsis
148-
(search-our-patches "nsis-gcc-10-memmove.patch")))
149-
150164
;; While LIEF is packaged in Guix, we maintain our own package,
151165
;; to simplify building, and more easily apply updates.
152166
;; Moreover, the Guix's package uses cmake, which caused build
@@ -382,29 +396,6 @@ certificates or paths. Supports various options, including: validation at a
382396
specific moment in time, whitelisting and revocation checks.")
383397
(license license:expat))))
384398

385-
(define-public python-altgraph
386-
(package
387-
(name "python-altgraph")
388-
(version "0.17")
389-
(source
390-
(origin
391-
(method git-fetch)
392-
(uri (git-reference
393-
(url "https://github.com/ronaldoussoren/altgraph")
394-
(commit (string-append "v" version))))
395-
(file-name (git-file-name name version))
396-
(sha256
397-
(base32
398-
"09sm4srvvkw458pn48ga9q7ykr4xlz7q8gh1h9w7nxpf001qgpwb"))))
399-
(build-system python-build-system)
400-
(home-page "https://github.com/ronaldoussoren/altgraph")
401-
(synopsis "Python graph (network) package")
402-
(description "altgraph is a fork of graphlib: a graph (network) package for
403-
constructing graphs, BFS and DFS traversals, topological sort, shortest paths,
404-
etc. with graphviz output.")
405-
(license license:expat)))
406-
407-
408399
(define-public python-macholib
409400
(package
410401
(name "python-macholib")
@@ -454,7 +445,7 @@ and endian independent.")
454445
(license license:expat)))
455446

456447
(define-public python-signapple
457-
(let ((commit "8a945a2e7583be2665cf3a6a89d665b70ecd1ab6"))
448+
(let ((commit "7a96b4171a360abf0f0f56e499f8f9ed2116280d"))
458449
(package
459450
(name "python-signapple")
460451
(version (git-version "0.1" "1" commit))
@@ -467,14 +458,13 @@ and endian independent.")
467458
(file-name (git-file-name name commit))
468459
(sha256
469460
(base32
470-
"0fr1hangvfyiwflca6jg5g8zvg3jc9qr7vd2c12ff89pznf38dlg"))))
461+
"0aa4k180jnpal15yhncnm3g3z9gzmi7qb25q5l0kaj444a1p2pm4"))))
471462
(build-system python-build-system)
472463
(propagated-inputs
473464
`(("python-asn1crypto" ,python-asn1crypto)
474465
("python-oscrypto" ,python-oscrypto)
475466
("python-certvalidator" ,python-certvalidator)
476467
("python-elfesteem" ,python-elfesteem)
477-
("python-requests" ,python-requests)
478468
("python-macholib" ,python-macholib)))
479469
;; There are no tests, but attempting to run python setup.py test leads to
480470
;; problems, just disable the test
@@ -512,6 +502,8 @@ inspecting signatures in Mach-O binaries.")
512502
(list "--enable-initfini-array=yes",
513503
"--enable-default-ssp=yes",
514504
"--enable-default-pie=yes",
505+
"--enable-standard-branch-protection=yes",
506+
"--enable-cet=yes",
515507
building-on)))
516508
((#:phases phases)
517509
`(modify-phases ,phases
@@ -593,9 +585,6 @@ inspecting signatures in Mach-O binaries.")
593585
automake
594586
pkg-config
595587
bison
596-
;; Native GCC 10 toolchain
597-
gcc-toolchain-10
598-
(list gcc-toolchain-10 "static")
599588
;; Scripting
600589
python-minimal ;; (3.10)
601590
;; Git
@@ -604,14 +593,23 @@ inspecting signatures in Mach-O binaries.")
604593
python-lief)
605594
(let ((target (getenv "HOST")))
606595
(cond ((string-suffix? "-mingw32" target)
607-
;; Windows
608-
(list zip
596+
(list ;; Native GCC 12 toolchain
597+
gcc-toolchain-12
598+
zip
609599
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
610-
(make-nsis-for-gcc-10 nsis-x86_64)
600+
nsis-x86_64
611601
nss-certs
612602
osslsigncode))
613603
((string-contains target "-linux-")
614-
(list (make-bitcoin-cross-toolchain target)))
604+
(list ;; Native GCC 12 toolchain
605+
gcc-toolchain-12
606+
(list gcc-toolchain-12 "static")
607+
(make-bitcoin-cross-toolchain target)))
615608
((string-contains target "darwin")
616-
(list clang-toolchain-10 binutils xorriso python-signapple))
609+
(list ;; Native GCC 11 toolchain
610+
gcc-toolchain-11
611+
binutils
612+
clang-toolchain-10
613+
python-signapple
614+
xorriso))
617615
(else '())))))
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
commit 6537181f59ed186a341db621812a6bc35e22eaf6
2+
Author: fanquake <fanquake@gmail.com>
3+
Date: Wed Apr 10 12:15:52 2024 +0200
4+
5+
build: turn on -muse-unaligned-vector-move by default
6+
7+
This allows us to avoid (more invasively) patching GCC, to avoid
8+
unaligned instruction use.
9+
10+
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
11+
index e0632681477..14a9653abdf 100644
12+
--- a/gas/config/tc-i386.c
13+
+++ b/gas/config/tc-i386.c
14+
@@ -801,7 +801,7 @@ static unsigned int no_cond_jump_promotion = 0;
15+
static unsigned int sse2avx;
16+
17+
/* Encode aligned vector move as unaligned vector move. */
18+
-static unsigned int use_unaligned_vector_move;
19+
+static unsigned int use_unaligned_vector_move = 1;
20+
21+
/* Encode scalar AVX instructions with specific vector length. */
22+
static enum

contrib/guix/patches/nsis-gcc-10-memmove.patch

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)