Skip to content

Commit e1ce5b8

Browse files
committed
Merge bitcoin#27897: guix: use GCC 12.3.0 to build releases
10d5653 guix: temporarily disable powerpcle taget (fanquake) 001412a guix: use GCC 12.3.0 (fanquake) ce54330 ci: use Debian Bookworm (GCC 12) for ARM ci job (fanquake) 0da6451 ci: use Debian Bookworm (GCC 12) for win64 job (fanquake) Pull request description: Switch to using [GCC `12.3.0`](https://gcc.gnu.org/gcc-12/) to build release binaries. Temporarily disables the `powerpc64le-linux-gnu` target due to non-determinism issues when building across `aarch64` and `x86_64`. Trying to fix the non-determinism was going to require trying to selectively disable optimization flags, which is already not ideal (and didn't fix all issues), and the migration to GCC 12 as our release compiler is now the blocker for multiple other (c++20 and similar) changes, so leaving this blocked on the `powerpc64le` binaries does not seem like a good tradeoff. ACKs for top commit: TheCharlatan: ACK 10d5653 Tree-SHA512: 401bbaaf2b72c795a06a24875ffd666151b41bae8f45bda10526ff4f6b59782704246afc6585f6b849021cbff8a7b861961d139bffe45536aaaeb3952b72ae57
2 parents 6850d72 + 10d5653 commit e1ce5b8

File tree

5 files changed

+51
-21
lines changed

5 files changed

+51
-21
lines changed

ci/test/00_setup_env_arm.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright (c) 2019-2021 The Bitcoin Core developers
3+
# Copyright (c) 2019-present The Bitcoin Core developers
44
# Distributed under the MIT software license, see the accompanying
55
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
66

@@ -10,7 +10,7 @@ export HOST=arm-linux-gnueabihf
1010
export DPKG_ADD_ARCH="armhf"
1111
export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
1212
export CONTAINER_NAME=ci_arm_linux
13-
export CI_IMAGE_NAME_TAG="docker.io/arm64v8/debian:bookworm"
13+
export CI_IMAGE_NAME_TAG="docker.io/arm64v8/debian:bookworm" # Check that https://packages.debian.org/bookworm/g++-arm-linux-gnueabihf (version 12.2, similar to guix) can cross-compile
1414
export USE_BUSY_BOX=true
1515
export RUN_UNIT_TESTS=true
1616
export RUN_FUNCTIONAL_TESTS=false

ci/test/00_setup_env_win64.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_win64
10-
export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:22.04" # Check that Jammy can cross-compile to win64
10+
export CI_IMAGE_NAME_TAG="docker.io/amd64/debian:bookworm" # Check that https://packages.debian.org/bookworm/g++-mingw-w64-x86-64-posix (version 12.2, similar to guix) can cross-compile
1111
export HOST=x86_64-w64-mingw32
1212
export DPKG_ADD_ARCH="i386"
1313
export PACKAGES="nsis g++-mingw-w64-x86-64-posix wine-binfmt wine64 wine32 file"

contrib/guix/guix-build

+2-1
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/manifest.scm

+17-8
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ chain for " target " development."))
9191
(home-page (package-home-page xgcc))
9292
(license (package-license xgcc)))))
9393

94-
(define base-gcc gcc-10)
94+
(define base-gcc gcc-12)
9595
(define base-linux-kernel-headers linux-libre-headers-6.1)
9696

9797
(define* (make-bitcoin-cross-toolchain target
@@ -505,9 +505,6 @@ inspecting signatures in Mach-O binaries.")
505505
automake
506506
pkg-config
507507
bison
508-
;; Native GCC 10 toolchain
509-
gcc-toolchain-10
510-
(list gcc-toolchain-10 "static")
511508
;; Scripting
512509
python-minimal ;; (3.10)
513510
;; Git
@@ -516,14 +513,26 @@ inspecting signatures in Mach-O binaries.")
516513
python-lief)
517514
(let ((target (getenv "HOST")))
518515
(cond ((string-suffix? "-mingw32" target)
519-
;; Windows
520-
(list zip
516+
(list ;; Native GCC 12 toolchain
517+
gcc-toolchain-12
518+
(list gcc-toolchain-12 "static")
519+
zip
521520
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
522521
nsis-x86_64
523522
nss-certs
524523
osslsigncode))
525524
((string-contains target "-linux-")
526-
(list (make-bitcoin-cross-toolchain target)))
525+
(list ;; Native GCC 12 toolchain
526+
gcc-toolchain-12
527+
(list gcc-toolchain-12 "static")
528+
(make-bitcoin-cross-toolchain target)))
527529
((string-contains target "darwin")
528-
(list clang-toolchain-17 binutils cmake-minimal python-signapple zip))
530+
(list ;; Native GCC 10 toolchain
531+
gcc-toolchain-10
532+
(list gcc-toolchain-10 "static")
533+
binutils
534+
clang-toolchain-17
535+
cmake-minimal
536+
python-signapple
537+
zip))
529538
(else '())))))

contrib/guix/patches/vmov-alignment.patch

+29-9
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,19 @@ Based on a patch originally by Claude Heiland-Allen <[email protected]>
168168
default:
169169
gcc_unreachable ();
170170
}
171-
--- a/gcc/config/i386/i386.c
172-
+++ b/gcc/config/i386/i386.c
173-
@@ -4981,13 +4981,13 @@
174-
switch (type)
171+
--- a/gcc/config/i386/i386.cc
172+
+++ b/gcc/config/i386/i386.cc
173+
@@ -5418,17 +5418,15 @@ ix86_get_ssemov (rtx *operands, unsigned size,
175174
{
176175
case opcode_int:
177-
- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
178-
+ opcode = "vmovdqu32";
176+
if (scalar_mode == E_HFmode)
177+
- opcode = (misaligned_p
178+
- ? (TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64")
179+
- : "vmovdqa64");
180+
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64";
181+
else
182+
- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
183+
+ opcode = "vmovdqu32";
179184
break;
180185
case opcode_float:
181186
- opcode = misaligned_p ? "vmovups" : "vmovaps";
@@ -187,9 +192,24 @@ Based on a patch originally by Claude Heiland-Allen <[email protected]>
187192
break;
188193
}
189194
}
190-
@@ -4996,16 +4996,16 @@
191-
switch (scalar_mode)
195+
@@ -5438,29 +5436,21 @@ ix86_get_ssemov (rtx *operands, unsigned size,
192196
{
197+
case E_HFmode:
198+
if (evex_reg_p)
199+
- opcode = (misaligned_p
200+
- ? (TARGET_AVX512BW
201+
- ? "vmovdqu16"
202+
- : "vmovdqu64")
203+
- : "vmovdqa64");
204+
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64";
205+
else
206+
- opcode = (misaligned_p
207+
- ? (TARGET_AVX512BW
208+
- ? "vmovdqu16"
209+
- : "%vmovdqu")
210+
- : "%vmovdqa");
211+
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "%vmovdqu";
212+
break;
193213
case E_SFmode:
194214
- opcode = misaligned_p ? "%vmovups" : "%vmovaps";
195215
+ opcode = "%vmovups";
@@ -208,7 +228,7 @@ Based on a patch originally by Claude Heiland-Allen <[email protected]>
208228
break;
209229
default:
210230
gcc_unreachable ();
211-
@@ -5017,48 +5017,32 @@
231+
@@ -5472,48 +5462,32 @@ ix86_get_ssemov (rtx *operands, unsigned size,
212232
{
213233
case E_QImode:
214234
if (evex_reg_p)

0 commit comments

Comments
 (0)