Merge bitcoin/bitcoin#33775: guix: use GCC 14.3.0 over 13.3.0

2a746500fa ci: migrate some jobs to Debian Trixie, use GCC 14 (fanquake)
fb0e6edfe8 guix: Apply SSA generation patch to maintain determinism (Mara van der Laan)
34909799fe guix: use GCC 14.3.0 over 13.3.0 (fanquake)
47be9122a7 guix: disable gprofng in GCC (fanquake)
ea29329eb7 guix: build GCC with --enable-host-bind-now (fanquake)
6f54e267d0 guix: disable libquadmath in GCC (fanquake)
7735901ed2 guix: disable building libgomp in GCC (fanquake)

Pull request description:

  Switching to using GCC 14.x for release builds has come up multiple times recently. It will eventually be needed for #25573, and could also be useful for #30210.

ACKs for top commit:
  hebasto:
    ACK 2a746500fa. I have reviewed the code and it looks OK. The new GCC patch looks reasonable.
  theuni:
    utACK 2a746500fa
  sedited:
    ACK 2a746500fa

Tree-SHA512: 56912bed19386f06d52fb94e0ef6d96f5415ab2de8b5e94890806d7cc0b937a3c4b11cc161aa2e06ca2fd3c392ef7501c91688e0897e1c1c51aafa963f3e50d9
This commit is contained in:
merge-script
2026-01-13 15:32:23 -08:00
8 changed files with 75 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ export HOST=arm-linux-gnueabihf
export DPKG_ADD_ARCH="armhf"
export PACKAGES="python3-zmq g++-arm-linux-gnueabihf libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
export CONTAINER_NAME=ci_arm_linux
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-arm-linux-gnueabihf (version 13.x, similar to guix) can cross-compile
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/g++-arm-linux-gnueabihf (version 14.x, similar to guix) can cross-compile
export CI_IMAGE_PLATFORM="linux/arm64"
export GOAL="install"
export CI_LIMIT_STACK_SIZE=1

View File

@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
export HOST=i686-pc-linux-gnu
export CONTAINER_NAME=ci_i686_no_multiprocess
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie"
export CI_IMAGE_PLATFORM="linux/amd64"
export PACKAGES="llvm clang g++-multilib"
export DEP_OPTS="DEBUG=1 NO_IPC=1"

View File

@@ -6,7 +6,7 @@
export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie"
export CONTAINER_NAME=ci_native_fuzz_valgrind
export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto"
export NO_DEPENDS=1

View File

@@ -6,7 +6,7 @@
export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie"
export CONTAINER_NAME=ci_native_valgrind
export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp"

View File

@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
export HOST=s390x-linux-gnu
export PACKAGES="python3-zmq"
export CONTAINER_NAME=ci_s390x
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie"
export CI_IMAGE_PLATFORM="linux/s390x"
# bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export TEST_RUNNER_EXTRA="--exclude rpc_bind --exclude feature_bind_extra"

View File

@@ -7,7 +7,7 @@
export LC_ALL=C.UTF-8
export CONTAINER_NAME=ci_win64_msvcrt
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-mingw-w64-x86-64-posix (version 13.x, similar to guix) can cross-compile
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/g++-mingw-w64-x86-64-posix (version 14.x, similar to guix) can cross-compile
export HOST=x86_64-w64-mingw32
export PACKAGES="g++-mingw-w64-x86-64-posix nsis"
export RUN_UNIT_TESTS=false

View File

@@ -94,7 +94,17 @@ chain for " target " development."))
(home-page (package-home-page xgcc))
(license (package-license xgcc)))))
(define base-gcc gcc-13) ;; 13.3.0
(define base-gcc
(package
(inherit gcc-14) ;; 14.2.0
(version "14.3.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
version "/gcc-" version ".tar.xz"))
(sha256
(base32
"0fna78ly417g69fdm4i5f3ms96g8xzzjza8gwp41lqr5fqlpgp70"))))))
(define base-linux-kernel-headers linux-libre-headers-6.1)
@@ -114,7 +124,7 @@ desirable for building Bitcoin Core release binaries."
(define (gcc-libgcc-patches gcc)
(package-with-extra-patches gcc
(search-our-patches "gcc-remap-guix-store.patch")))
(search-our-patches "gcc-remap-guix-store.patch" "gcc-ssa-generation.patch")))
(define (binutils-mingw-patches binutils)
(package-with-extra-patches binutils
@@ -432,7 +442,9 @@ inspecting signatures in Mach-O binaries.")
;; https://gcc.gnu.org/install/configure.html
(list "--enable-threads=posix",
"--enable-default-ssp=yes",
"--enable-host-bind-now=yes",
"--disable-gcov",
"--disable-libgomp",
building-on)))))))
(define-public linux-base-gcc
@@ -446,9 +458,13 @@ inspecting signatures in Mach-O binaries.")
(list "--enable-initfini-array=yes",
"--enable-default-ssp=yes",
"--enable-default-pie=yes",
"--enable-host-bind-now=yes",
"--enable-standard-branch-protection=yes",
"--enable-cet=yes",
"--enable-gprofng=no",
"--disable-gcov",
"--disable-libgomp",
"--disable-libquadmath",
"--disable-libsanitizer",
building-on)))
((#:phases phases)
@@ -555,7 +571,7 @@ inspecting signatures in Mach-O binaries.")
gzip
xz
;; Build tools
gcc-toolchain-13
gcc-toolchain-14
cmake-minimal
gnu-make
ninja
@@ -575,7 +591,7 @@ inspecting signatures in Mach-O binaries.")
((string-contains target "-linux-")
(list bison
pkg-config
(list gcc-toolchain-13 "static")
(list gcc-toolchain-14 "static")
(make-bitcoin-cross-toolchain target)))
((string-contains target "darwin")
(list clang-toolchain-19

View File

@@ -0,0 +1,49 @@
commit b46614ebfc57ccca8a050668ad0e8ba5968c5943
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Jan 6 08:36:20 2026 +0100
tree-object-size: Deterministic SSA generation [PR123351]
The order of evaluation of function arguments is unspecified in C++.
The function object_sizes_set_temp called object_sizes_set with two
calls to make_ssa_name() as arguments. Since make_ssa_name() has the
side effect of incrementing the global SSA version counter, different
architectures of the same compiler evaluated these calls in different
orders.
This resulted in non-deterministic SSA version numbering between
x86_64 and aarch64 hosts during cross-compilation, leading to
divergent object files.
Sequencing the calls into separate statements ensures deterministic
evaluation order.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123351
https://gcc.gnu.org/pipermail/gcc-patches/2026-January/704817.html
2026-01-06 Jakub Jelinek <jakub@redhat.com>
Marco Falke <falke.marco@gmail.com>
PR tree-optimization/123351
* tree-object-size.cc (object_sizes_set_temp): Separate calls to
make_ssa_name to ensure deterministic execution order.
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 018fbc30cbb..24e7d710371 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -319,9 +319,11 @@ object_sizes_set_temp (struct object_size_info *osi, unsigned varno)
tree val = object_sizes_get (osi, varno);
if (size_initval_p (val, osi->object_size_type))
- object_sizes_set (osi, varno,
- make_ssa_name (sizetype),
- make_ssa_name (sizetype));
+ {
+ val = make_ssa_name (sizetype);
+ tree wholeval = make_ssa_name (sizetype);
+ object_sizes_set (osi, varno, val, wholeval);
+ }
}
/* Initialize OFFSET_LIMIT variable. */