Skip to content

Commit c5b5dd9

Browse files
authored
Merge pull request #122 from TheCharlatan/subtree_3789215f73466606eb111714f596a2a5e9bb1933
subtree: Update to latest master
2 parents 04390d4 + fcf62b1 commit c5b5dd9

Some content is hidden

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

50 files changed

+816
-889
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ jobs:
468468
file-env: './ci/test/00_setup_env_arm.sh'
469469
provider: 'gha'
470470

471-
- name: 'ASan + LSan + UBSan + integer, no depends, USDT'
471+
- name: 'ASan + LSan + UBSan + integer'
472472
cirrus-runner: 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md' # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
473473
fallback-runner: 'ubuntu-24.04'
474474
timeout-minutes: 120
@@ -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_asan.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export NO_DEPENDS=1
2626
export GOAL="install"
2727
export CI_LIMIT_STACK_SIZE=1
2828
export BITCOIN_CONFIG="\
29-
-DWITH_USDT=ON -DWITH_ZMQ=ON -DBUILD_GUI=ON \
29+
--preset=dev-mode \
3030
-DSANITIZERS=address,float-divide-by-zero,integer,undefined \
3131
-DCMAKE_C_COMPILER=clang \
3232
-DCMAKE_CXX_COMPILER=clang++ \

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

0 commit comments

Comments
 (0)