Skip to content

Commit b524379

Browse files
committed
Merge commit '75d8345983f07bffde4441b2aa7c17b18ebd0144' into validation_helpers
2 parents 04390d4 + 75d8345 commit b524379

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1583
-1012
lines changed

libbitcoinkernel-sys/bitcoin/.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ jobs:
510510
timeout-minutes: 240
511511
file-env: './ci/test/00_setup_env_native_fuzz_with_valgrind.sh'
512512

513-
- name: 'previous releases, depends DEBUG'
513+
- name: 'previous releases'
514514
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md'
515515
fallback-runner: 'ubuntu-24.04'
516516
timeout-minutes: 120

libbitcoinkernel-sys/bitcoin/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ else()
463463
try_append_cxx_flags("-Wself-assign" TARGET warn_interface SKIP_LINK)
464464
try_append_cxx_flags("-Wbidi-chars=any" TARGET warn_interface SKIP_LINK)
465465
try_append_cxx_flags("-Wundef" TARGET warn_interface SKIP_LINK)
466+
try_append_cxx_flags("-Wleading-whitespace=spaces" TARGET warn_interface SKIP_LINK)
467+
try_append_cxx_flags("-Wtrailing-whitespace=any" TARGET warn_interface SKIP_LINK)
466468

467469
# Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
468470
# unknown options if any other warning is produced. Test the -Wfoo case, and
@@ -493,8 +495,8 @@ try_append_cxx_flags("-fmacro-prefix-map=A=B" TARGET core_interface SKIP_LINK
493495
IF_CHECK_PASSED "-fmacro-prefix-map=${PROJECT_SOURCE_DIR}/src=."
494496
)
495497

496-
# Currently all versions of gcc are subject to a class of bugs, see the
497-
# gccbug_90348 test case (only reproduces on GCC 11 and earlier) and
498+
# GCC versions 13.2 (and earlier) are subject to a class of bugs, see
499+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348 and the meta bug
498500
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111843. To work around that, set
499501
# -fstack-reuse=none for all gcc builds. (Only gcc understands this flag).
500502
try_append_cxx_flags("-fstack-reuse=none" TARGET core_interface)

libbitcoinkernel-sys/bitcoin/ci/lint/01_install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ ${CI_RETRY_EXE} apt-get update
1818
# - curl/xz-utils (to install shellcheck)
1919
# - git (used in many lint scripts)
2020
# - gpg (used by verify-commits)
21-
${CI_RETRY_EXE} apt-get install -y cargo curl xz-utils git gpg
21+
# - moreutils (used by scripted-diff)
22+
${CI_RETRY_EXE} apt-get install -y cargo curl xz-utils git gpg moreutils
2223

2324
PYTHON_PATH="/python_build"
2425
if [ ! -d "${PYTHON_PATH}/bin" ]; then

libbitcoinkernel-sys/bitcoin/ci/test/00_setup_env_arm.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ export GOAL="install"
1919
export CI_LIMIT_STACK_SIZE=1
2020
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
2121
# This could be removed once the ABI change warning does not show up by default
22-
#
23-
# -Wno-error=dangling-reference helps to work around a GCC 13.1 false-positive,
24-
# fixed in later versions.
2522
export BITCOIN_CONFIG=" \
2623
-DREDUCE_EXPORTS=ON \
27-
-DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=dangling-reference -Wno-error=maybe-uninitialized' \
24+
-DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=maybe-uninitialized' \
2825
"

libbitcoinkernel-sys/bitcoin/ci/test/00_setup_env_native_previous_releases.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_previous_releases
1010
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:22.04"
11-
# Use minimum supported python3.10 and gcc-11, see doc/dependencies.md
12-
export PACKAGES="gcc-11 g++-11 python3-zmq"
13-
export DEP_OPTS="CC=gcc-11 CXX=g++-11"
11+
# Use minimum supported python3.10 and gcc-12, see doc/dependencies.md
12+
export PACKAGES="gcc-12 g++-12 python3-zmq"
13+
export DEP_OPTS="CC=gcc-12 CXX=g++-12"
1414
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
1515
export GOAL="install"
1616
export CI_LIMIT_STACK_SIZE=1
1717
export DOWNLOAD_PREVIOUS_RELEASES="true"
1818
export BITCOIN_CONFIG="\
19-
-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON \
19+
--preset=dev-mode \
20+
-DREDUCE_EXPORTS=ON \
2021
-DCMAKE_BUILD_TYPE=Debug \
2122
-DCMAKE_C_FLAGS='-funsigned-char' \
2223
-DCMAKE_C_FLAGS_DEBUG='-g2 -O2' \

libbitcoinkernel-sys/bitcoin/ci/test/00_setup_env_win64.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ export PACKAGES="g++-mingw-w64-x86-64-posix nsis"
1313
export RUN_UNIT_TESTS=false
1414
export RUN_FUNCTIONAL_TESTS=false
1515
export GOAL="deploy"
16-
# -Wno-error=dangling-reference helps to work around a GCC 13.1 false-positive,
17-
# fixed in later versions.
1816
export BITCOIN_CONFIG="-DREDUCE_EXPORTS=ON -DBUILD_GUI_TESTS=OFF -DBUILD_KERNEL_LIB=ON -DBUILD_KERNEL_TEST=ON \
19-
-DCMAKE_CXX_FLAGS='-Wno-error=dangling-reference -Wno-error=maybe-uninitialized' \
17+
-DCMAKE_CXX_FLAGS='-Wno-error=maybe-uninitialized' \
2018
"

libbitcoinkernel-sys/bitcoin/contrib/guix/libexec/build.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,15 @@ esac
225225

226226
# LDFLAGS
227227
case "$HOST" in
228-
*linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -static-libstdc++ -Wl,-O2" ;;
228+
*linux*) HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -Wl,-O2" ;;
229229
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
230230
esac
231231

232+
# EXE FLAGS
233+
case "$HOST" in
234+
*linux*) CMAKE_EXE_LINKER_FLAGS="-DCMAKE_EXE_LINKER_FLAGS=${HOST_LDFLAGS} -static-libstdc++ -static-libgcc" ;;
235+
esac
236+
232237
mkdir -p "$DISTSRC"
233238
(
234239
cd "$DISTSRC"
@@ -243,7 +248,8 @@ mkdir -p "$DISTSRC"
243248
--toolchain "${BASEPREFIX}/${HOST}/toolchain.cmake" \
244249
-DWITH_CCACHE=OFF \
245250
-Werror=dev \
246-
${CONFIGFLAGS}
251+
${CONFIGFLAGS} \
252+
"${CMAKE_EXE_LINKER_FLAGS}"
247253

248254
# Build Bitcoin Core
249255
cmake --build build -j "$JOBS" ${V:+--verbose}

libbitcoinkernel-sys/bitcoin/contrib/guix/manifest.scm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ chain for " target " development."))
9999

100100
(define* (make-bitcoin-cross-toolchain target
101101
#:key
102-
(base-gcc-for-libc linux-base-gcc)
102+
(base-gcc-for-libc (gcc-libgcc-patches linux-base-gcc))
103103
(base-kernel-headers base-linux-kernel-headers)
104104
(base-libc glibc-2.31)
105-
(base-gcc linux-base-gcc))
105+
(base-gcc (gcc-libgcc-patches linux-base-gcc)))
106106
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
107107
desirable for building Bitcoin Core release binaries."
108108
(make-cross-toolchain target
@@ -111,7 +111,7 @@ desirable for building Bitcoin Core release binaries."
111111
base-libc
112112
base-gcc))
113113

114-
(define (gcc-mingw-patches gcc)
114+
(define (gcc-libgcc-patches gcc)
115115
(package-with-extra-patches gcc
116116
(search-our-patches "gcc-remap-guix-store.patch")))
117117

@@ -128,10 +128,10 @@ desirable for building Bitcoin Core release binaries."
128128
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
129129
(machine (substring target 0 (string-index target #\-)))
130130
(pthreads-xlibc (winpthreads-patches (make-mingw-w64 machine
131-
#:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc))
131+
#:xgcc (cross-gcc target #:xgcc (gcc-libgcc-patches base-gcc))
132132
#:with-winpthreads? #t)))
133133
(pthreads-xgcc (cross-gcc target
134-
#:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
134+
#:xgcc (gcc-libgcc-patches mingw-w64-base-gcc)
135135
#:xbinutils xbinutils
136136
#:libc pthreads-xlibc)))
137137
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
Without ffile-prefix-map, the debug symbols will contain paths for the
1+
Without -ffile-prefix-map, the debug symbols will contain paths for the
22
guix store which will include the hashes of each package. However, the
33
hash for the same package will differ when on different architectures.
44
In order to be reproducible regardless of the architecture used to build
55
the package, map all guix store prefixes to something fixed, e.g. /usr.
66

77
--- a/libgcc/Makefile.in
88
+++ b/libgcc/Makefile.in
9-
@@ -854,7 +854,7 @@ endif
9+
@@ -857,7 +857,7 @@ endif
1010
# libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
1111
# LIB2ADDEHSHARED matter. (Usually all three are identical.)
1212

@@ -15,6 +15,15 @@ the package, map all guix store prefixes to something fixed, e.g. /usr.
1515

1616
ifeq ($(enable_shared),yes)
1717

18+
@@ -880,7 +880,7 @@ endif
19+
# Build LIBUNWIND. Use -fno-exceptions so that the unwind library does
20+
# not generate calls to __gcc_personality_v0.
21+
22+
-c_flags := -fno-exceptions
23+
+c_flags := -fno-exceptions $(shell find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;)
24+
25+
libunwind-objects += $(addsuffix $(objext),$(basename $(notdir $(LIBUNWIND))))
26+
1827
--
1928
2.37.0
2029

libbitcoinkernel-sys/bitcoin/contrib/guix/symbol-check.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,25 @@
1616

1717
# Debian 11 (Bullseye) EOL: 2026. https://wiki.debian.org/LTS
1818
#
19-
# - libgcc version 10.2.1 (https://packages.debian.org/bullseye/libgcc-s1)
2019
# - libc version 2.31 (https://packages.debian.org/source/bullseye/glibc)
2120
#
2221
# Ubuntu 20.04 (Focal) EOL: 2030. https://wiki.ubuntu.com/ReleaseTeam
2322
#
24-
# - libgcc version 10.5.0 (https://packages.ubuntu.com/focal/libgcc1)
2523
# - libc version 2.31 (https://packages.ubuntu.com/focal/libc6)
2624
#
2725
# CentOS Stream 9 EOL: 2027. https://www.centos.org/cl-vs-cs/#end-of-life
2826
#
29-
# - libgcc version 12.2.1 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/)
3027
# - libc version 2.34 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/)
3128
#
32-
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
3329

3430
MAX_VERSIONS = {
35-
'GCC': (7,0,0),
3631
'GLIBC': {
3732
lief.ELF.ARCH.X86_64: (2,31),
3833
lief.ELF.ARCH.ARM: (2,31),
3934
lief.ELF.ARCH.AARCH64:(2,31),
4035
lief.ELF.ARCH.PPC64: (2,31),
4136
lief.ELF.ARCH.RISCV: (2,31),
4237
},
43-
'LIBATOMIC': (1,0),
4438
'V': (0,5,0), # xkb (bitcoin-qt only)
4539
}
4640

@@ -93,11 +87,9 @@
9387
# Allowed NEEDED libraries
9488
ELF_ALLOWED_LIBRARIES = {
9589
# bitcoind and bitcoin-qt
96-
'libgcc_s.so.1', # GCC base support
9790
'libc.so.6', # C library
9891
'libpthread.so.0', # threading
9992
'libm.so.6', # math library
100-
'libatomic.so.1',
10193
'ld-linux-x86-64.so.2', # 64-bit dynamic linker
10294
'ld-linux.so.2', # 32-bit dynamic linker
10395
'ld-linux-aarch64.so.1', # 64-bit ARM dynamic linker

0 commit comments

Comments
 (0)