What changed, and why it matters
This commit adds a new automated build test for Bitcoin Core that cross-compiles for OpenBSD. It downloads official OpenBSD system files from the OpenBSD project's own download server and sets up the build environment. There is no change to the Bitcoin Core software itself, no user-facing feature, and no security fix or vulnerability.
No security action needed. This is an infrastructure-only CI addition. Normal code-review approval is sufficient.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit introduces a GitHub Actions CI job named ‘OpenBSD Cross’ and supporting shell scripts. It adds a matrix entry in .github/workflows/ci.yml, a new environment setup script ci/test/00_setup_env_openbsd_cross.sh that configures clang/llvm cross-compilation to x86_64-unknown-openbsd, and extends ci/test/01_base_install.sh to download base79.tgz and comp79.tgz from https://cdn.openbsd.org and extract them into DEPENDS_DIR/SDKs, plus create unversioned .so symlinks needed by lld. RUN_UNIT_TESTS and RUN_FUNCTIONAL_TESTS are both set to false, so this is purely a compilation smoke test.
Changed components
.github/workflows/ci.ymlci/test/00_setup_env_openbsd_cross.shci/test/01_base_install.shInspect captured patch +60 / −0
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bf8da3b0..2a3ce603 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -469,6 +469,12 @@ jobs:
timeout-minutes: 120
file-env: './ci/test/00_setup_env_freebsd_cross.sh'
+ - name: 'OpenBSD Cross'
+ warp-runner: 'warp-ubuntu-latest-x64-8x'
+ fallback-runner: 'ubuntu-latest'
+ timeout-minutes: 120
+ file-env: './ci/test/00_setup_env_openbsd_cross.sh'
+
- name: 'No wallet'
warp-runner: 'warp-ubuntu-latest-x64-4x'
fallback-runner: 'ubuntu-latest'
diff --git a/ci/test/00_setup_env_openbsd_cross.sh b/ci/test/00_setup_env_openbsd_cross.sh
new file mode 100755
index 00000000..3d80e286
--- /dev/null
+++ b/ci/test/00_setup_env_openbsd_cross.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or https://opensource.org/license/mit.
+
+export LC_ALL=C.UTF-8
+
+export CONTAINER_NAME=ci_openbsd_cross
+export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
+export APT_LLVM_V="22"
+export HOST=x86_64-unknown-openbsd
+export OPENBSD_VERSION=7.9
+export OPENBSD_SDK_BASENAME="openbsd-${HOST}-${OPENBSD_VERSION}"
+export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} lld"
+export SYSROOT="--sysroot=${DEPENDS_DIR}/SDKs/${OPENBSD_SDK_BASENAME}"
+export DEP_OPTS="build_CC=clang build_CXX=clang++ \
+ CC='clang --target=${HOST} ${SYSROOT}' \
+ CXX='clang++ --target=${HOST} ${SYSROOT} -stdlib=libc++' \
+ LDFLAGS='-fuse-ld=lld' \
+ AR=llvm-ar-${APT_LLVM_V} \
+ NM=llvm-nm-${APT_LLVM_V} \
+ OBJCOPY=llvm-objcopy-${APT_LLVM_V} \
+ OBJDUMP=llvm-objdump-${APT_LLVM_V} \
+ RANLIB=llvm-ranlib-${APT_LLVM_V} \
+ STRIP=llvm-strip-${APT_LLVM_V}"
+export GOAL="install"
+export BITCOIN_CONFIG="\
+ --preset=dev-mode \
+ -DBUILD_GUI=OFF \
+ -DREDUCE_EXPORTS=ON \
+ -DWITH_USDT=OFF \
+"
+export RUN_UNIT_TESTS="false"
+export RUN_FUNCTIONAL_TESTS="false"
diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh
index 54dafbe8..2d338a70 100755
--- a/ci/test/01_base_install.sh
+++ b/ci/test/01_base_install.sh
@@ -122,4 +122,23 @@ if [ -n "$FREEBSD_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${FREEBSD_SDK_BASENA
tar -C "${DEPENDS_DIR}/SDKs/${FREEBSD_SDK_BASENAME}" -xf "$FREEBSD_SDK_PATH"
fi
+if [ -n "$OPENBSD_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OPENBSD_SDK_BASENAME}" ]; then
+ mkdir -p "${DEPENDS_DIR}/SDKs/${OPENBSD_SDK_BASENAME}"
+ for OPENBSD_SDK_FILENAME in base79.tgz comp79.tgz; do
+ OPENBSD_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OPENBSD_SDK_FILENAME}"
+ if [ ! -f "$OPENBSD_SDK_PATH" ]; then
+ ${CI_RETRY_EXE} curl --location --fail "https://cdn.openbsd.org/pub/OpenBSD/${OPENBSD_VERSION}/amd64/${OPENBSD_SDK_FILENAME}" -o "$OPENBSD_SDK_PATH"
+ fi
+ tar -C "${DEPENDS_DIR}/SDKs/${OPENBSD_SDK_BASENAME}" -xf "$OPENBSD_SDK_PATH"
+ (
+ # The SDK has versioned shared libs, but no unversioned libfoo.so symlink,
+ # which breaks linking the kernel with lld. Create the symlinks.
+ cd "${DEPENDS_DIR}/SDKs/${OPENBSD_SDK_BASENAME}/usr/lib"
+ ln -sf libc++abi.so.*.* libc++abi.so
+ ln -sf libc++.so.*.* libc++.so
+ ln -sf libpthread.so.*.* libpthread.so
+ )
+ done
+fi
+
echo -n "done" > "${CFG_DONE}"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.