From 855c4f1926f3e9f6d7518ba17a1a62e5a6bbbecc Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Sun, 8 Nov 2026 17:18:49 -0500 Subject: [PATCH 1/2] Regenerate artifacts. --- .github/workflows/ci-expanded.yml | 290 +++++++++++++++++- .github/workflows/ci.yml | 2 +- builds/cmake/CMakeLists.txt | 7 + builds/cmake/install-cmake.sh | 12 +- builds/cmake/install-presets.sh | 12 +- .../cmake/libbitcoin-database-config.cmake.in | 4 + builds/gnu/configure.ac | 7 + builds/gnu/install-gnu.sh | 12 +- builds/msvc/build-msvc.cmd | 26 +- builds/msvc/properties/Common.props | 20 +- builds/msvc/properties/Messages.props | 1 - 11 files changed, 336 insertions(+), 57 deletions(-) diff --git a/.github/workflows/ci-expanded.yml b/.github/workflows/ci-expanded.yml index 1464a5be2..77073a285 100644 --- a/.github/workflows/ci-expanded.yml +++ b/.github/workflows/ci-expanded.yml @@ -318,7 +318,29 @@ jobs: coverage: "" package: "gcc-s390x-linux-gnu g++-s390x-linux-gnu qemu-user-static" host: "s390x-linux-gnu" - options: "--enable-isystem --build-skip-test-run" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "powerpc64le-linux-gnu-gcc" + cxx: "powerpc64le-linux-gnu-g++" + flags: "" + coverage: "" + package: "gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu qemu-user-static" + host: "powerpc64le-linux-gnu" + options: "--enable-isystem" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "powerpc64-linux-gnu-gcc" + cxx: "powerpc64-linux-gnu-g++" + flags: "" + coverage: "" + package: "gcc-powerpc64-linux-gnu g++-powerpc64-linux-gnu qemu-user-static" + host: "powerpc64-linux-gnu" + options: "--enable-isystem" - image: macos-26-intel config: "release" @@ -356,9 +378,9 @@ jobs: cxx: "arm-linux-gnueabihf-g++" flags: "" coverage: "" - package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf" + package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf qemu-user-static" host: "arm-linux-gnueabihf" - options: "--enable-isystem --build-skip-test-run" + options: "--enable-isystem" - image: ubuntu-26.04 config: "release" @@ -371,6 +393,42 @@ jobs: host: "x86_64-w64-mingw32" options: "--enable-isystem --build-skip-test-run" + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-18 --target=x86_64-unknown-freebsd15.1 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument" + cxx: "clang++-18 --target=x86_64-unknown-freebsd15.1 --sysroot=/tmp/sysroot -stdlib=libc++ -fuse-ld=lld -Wno-unused-command-line-argument" + flags: "" + coverage: "" + package: "lld-18" + host: "x86_64-unknown-freebsd15.1" + sysroot: "https://download.freebsd.org/releases/amd64/15.1-RELEASE/base.txz 3768988b151c20f965679062b065c63a977d6bbb9f47fd83695ec2c40790c18f" + options: "--enable-isystem --build-skip-test-run" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-18 --target=x86_64-unknown-openbsd7.9 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument" + cxx: "clang++-18 --target=x86_64-unknown-openbsd7.9 --sysroot=/tmp/sysroot -stdlib=libc++ -fuse-ld=lld -Wno-unused-command-line-argument" + flags: "" + coverage: "" + package: "lld-18" + host: "x86_64-unknown-openbsd7.9" + sysroot: "https://cdn.openbsd.org/pub/OpenBSD/7.9/amd64/base79.tgz 923d2e03f06408d50d4848334398c6d04b5514dcac7917badfc178a0eef248de https://cdn.openbsd.org/pub/OpenBSD/7.9/amd64/comp79.tgz 21a67af20aebcabf85b09f4206fc95b4cae0a35d42b154b976f0159f457724f9" + options: "--enable-isystem --build-skip-test-run" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-18 --target=x86_64-unknown-netbsd11.0 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument" + cxx: "clang++-18 --target=x86_64-unknown-netbsd11.0 --sysroot=/tmp/sysroot -stdlib=libstdc++ -nostdinc++ -isystem /tmp/sysroot/gcc14/include/c++ -isystem /tmp/sysroot/gcc14/include/c++/x86_64--netbsd -L/tmp/sysroot/gcc14/lib -fuse-ld=lld -Wno-unused-command-line-argument -lgcc_s" + flags: "" + coverage: "" + package: "lld-18" + host: "x86_64-unknown-netbsd11.0" + sysroot: "https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.0/amd64/binary/sets/base.tar.xz 06bc97d2ea7cbb7fea55e8b5fff17e26b642ebe3ca6475202954658e229e303c https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.0/amd64/binary/sets/comp.tar.xz e14cf9f6ea080d90a148918a4f73a3696c473c60a435985f4316a9033abc0b3e https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/11.0_2026Q3/All/gcc14-14.3.0nb3.tgz 8fca3189af23c742b84641c8d861cf1bf485576265da132fd2ee7bb818e6bc50" + options: "--enable-isystem --build-skip-test-run" + runs-on: ${{ matrix.image }} env: @@ -457,6 +515,21 @@ jobs: echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV fi + - name: Prepare sysroot [cross] + if: ${{ matrix.sysroot }} + shell: bash + run: | + mkdir -p /tmp/sysroot + set -- ${{ matrix.sysroot }} + while [[ $# -gt 1 ]]; do + curl --fail --silent --show-error --location --output sysroot.archive "$1" + echo "$2 sysroot.archive" | sha256sum --check + tar -xf sysroot.archive -C /tmp/sysroot + rm sysroot.archive + shift 2 + done + find /tmp/sysroot -name '*.la' -delete + - name: Verify emulation [cross] if: ${{ matrix.host }} shell: bash @@ -472,12 +545,14 @@ jobs: - name: Execute installation shell: bash working-directory: 'libbitcoin-database' + env: + MAKEFLAGS: "${{ matrix.host && 'TESTS=' || '' }}" run: > ./builds/gnu/install-gnu.sh --build-use-local-src --build-src-dir="${{ github.workspace }}" --prefix="${{ github.workspace }}/prefix" - --build-post-install-clean + ${{ !matrix.host && '--build-post-install-clean' || '' }} --build-obj-dir="obj" --build-obj-dir-relative --build-config="${{ matrix.config }}" @@ -485,6 +560,165 @@ jobs: ${{ matrix.options }} ${{ matrix.host && format('--host={0}', matrix.host) || '' }} + - name: Execute tests [cross] + if: ${{ matrix.host && !contains(matrix.options, '--build-skip-test') }} + shell: bash + working-directory: 'libbitcoin-database/obj/builds/gnu' + run: > + ./test/libbitcoin-database-test + --log_level=test_suite + --report_level=short + --show_progress=no + --detect_memory_leak=0 + --build_info=yes + + - name: Coverage calculation + if: ${{ matrix.coverage == 'lcov' }} + shell: bash + working-directory: 'libbitcoin-database' + run: | + lcov --ignore-errors version,gcov,mismatch,mismatch --directory . --capture --output-file coverage.info + lcov --ignore-errors unused --extract coverage.info "${{ github.workspace }}/libbitcoin-database/include/*" "${{ github.workspace }}/libbitcoin-database/src/*" --output-file coverage.info + + - name: Coveralls.io upload + if: ${{ matrix.coverage == 'lcov' }} + shell: bash + working-directory: 'libbitcoin-database' + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-linux-x86_64.tar.gz + curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt + grep -F coveralls-linux-x86_64.tar.gz coveralls-checksums.txt | sha256sum -c + tar -xzf coveralls-linux-x86_64.tar.gz + ./coveralls report --format lcov coverage.info + + - name: Test artifact collection + if: failure() + shell: bash + working-directory: ${{ github.workspace }} + run: | + if [[ -e "libbitcoin-system/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-system/obj/Testing/Temporary/LastTest.log" libbitcoin-system-LastTest.errors + fi + if [[ -e "libbitcoin-system/obj/test-suite.log" ]]; then + cp "libbitcoin-system/obj/test-suite.log" libbitcoin-system-test-suite.errors + fi + if [[ -e "libbitcoin-system/obj/test.log" ]]; then + cp "libbitcoin-system/obj/test.log" libbitcoin-system-test.errors + fi + if [[ -e "libbitcoin-database/obj/Testing/Temporary/LastTest.log" ]]; then + cp "libbitcoin-database/obj/Testing/Temporary/LastTest.log" libbitcoin-database-LastTest.errors + fi + if [[ -e "libbitcoin-database/obj/test-suite.log" ]]; then + cp "libbitcoin-database/obj/test-suite.log" libbitcoin-database-test-suite.errors + fi + if [[ -e "libbitcoin-database/obj/test.log" ]]; then + cp "libbitcoin-database/obj/test.log" libbitcoin-database-test.errors + fi + + - name: Test artifact upload + if: failure() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: testlogs + path: ${{ github.workspace }}/*.errors + retention-days: 1 + if-no-files-found: warn + + musl: + if: github.event_name != 'pull_request' || github.event.action != 'closed' + + strategy: + fail-fast: false + + matrix: + include: + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "gcc" + cxx: "g++" + flags: "" + coverage: "" + options: "--enable-isystem" + + runs-on: ${{ matrix.image }} + container: + image: alpine:3.24 + volumes: + - ${{ github.workspace }}:${{ github.workspace }} + + env: + CC: '${{ matrix.cc }}' + CXX: '${{ matrix.cxx }}' + CFLAGS: '${{ matrix.flags }}' + CXXFLAGS: '${{ matrix.flags }}' + + steps: + - name: Prepare toolchain [alpine] + shell: sh + run: | + apk add --no-cache bash git build-base autoconf automake libtool pkgconf linux-headers ${{ matrix.package || '' }} + + - name: Get branch name + id: get-branch + shell: bash + run: | + if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then + echo "branch=$GITHUB_HEAD_REF" >> $GITHUB_OUTPUT + else + echo "branch=$GITHUB_REF_NAME" >> $GITHUB_OUTPUT + fi + + - name: Checkout repository [libbitcoin-system] + id: checkout-libbitcoin-system + continue-on-error: true + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 1 + path: 'libbitcoin-system' + ref: ${{ steps.get-branch.outputs.branch }} + repository: ${{ github.repository_owner }}/libbitcoin-system + + - name: Checkout repository [libbitcoin-system] cleanup on failure + continue-on-error: true + if: steps.checkout-libbitcoin-system.outcome == 'failure' + shell: bash + run: | + rm -rf ${{ github.workspace }}/libbitcoin-system + + + - name: Checkout repository [libbitcoin-database] + id: checkout-libbitcoin-database + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 1 + path: 'libbitcoin-database' + repository: ${{ github.repository }} + + - name: Environmental Computation + shell: bash + run: | + if [[ "${{ matrix.link }}" == "dynamic" ]]; then + echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV + fi + + - name: Execute installation + shell: bash + working-directory: 'libbitcoin-database' + run: > + ./builds/gnu/install-gnu.sh + --build-use-local-src + --build-src-dir="${{ github.workspace }}" + --prefix="${{ github.workspace }}/prefix" + --build-post-install-clean + --build-obj-dir="obj" + --build-obj-dir-relative + --build-config="${{ matrix.config }}" + --build-link="${{ matrix.link }}" + ${{ matrix.options }} + - name: Coverage calculation if: ${{ matrix.coverage == 'lcov' }} shell: bash @@ -811,6 +1045,39 @@ jobs: package: "g++-16 gcc-16" options: "" + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-18 --target=x86_64-unknown-freebsd15.1 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument" + cxx: "clang++-18 --target=x86_64-unknown-freebsd15.1 --sysroot=/tmp/sysroot -stdlib=libc++ -fuse-ld=lld -Wno-unused-command-line-argument" + flags: "" + coverage: "" + package: "lld-18" + sysroot: "https://download.freebsd.org/releases/amd64/15.1-RELEASE/base.txz 3768988b151c20f965679062b065c63a977d6bbb9f47fd83695ec2c40790c18f" + options: "--build-skip-test-run -DCMAKE_SYSTEM_NAME=FreeBSD -DCMAKE_SYSTEM_PROCESSOR=x86_64" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-18 --target=x86_64-unknown-openbsd7.9 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument" + cxx: "clang++-18 --target=x86_64-unknown-openbsd7.9 --sysroot=/tmp/sysroot -stdlib=libc++ -fuse-ld=lld -Wno-unused-command-line-argument" + flags: "" + coverage: "" + package: "lld-18" + sysroot: "https://cdn.openbsd.org/pub/OpenBSD/7.9/amd64/base79.tgz 923d2e03f06408d50d4848334398c6d04b5514dcac7917badfc178a0eef248de https://cdn.openbsd.org/pub/OpenBSD/7.9/amd64/comp79.tgz 21a67af20aebcabf85b09f4206fc95b4cae0a35d42b154b976f0159f457724f9" + options: "--build-skip-test-run -DCMAKE_SYSTEM_NAME=OpenBSD -DCMAKE_SYSTEM_PROCESSOR=x86_64" + + - image: ubuntu-24.04 + config: "release" + link: "static" + cc: "clang-18 --target=x86_64-unknown-netbsd11.0 --sysroot=/tmp/sysroot -fuse-ld=lld -Wno-unused-command-line-argument" + cxx: "clang++-18 --target=x86_64-unknown-netbsd11.0 --sysroot=/tmp/sysroot -stdlib=libstdc++ -nostdinc++ -isystem /tmp/sysroot/gcc14/include/c++ -isystem /tmp/sysroot/gcc14/include/c++/x86_64--netbsd -L/tmp/sysroot/gcc14/lib -fuse-ld=lld -Wno-unused-command-line-argument -lgcc_s" + flags: "" + coverage: "" + package: "lld-18" + sysroot: "https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.0/amd64/binary/sets/base.tar.xz 06bc97d2ea7cbb7fea55e8b5fff17e26b642ebe3ca6475202954658e229e303c https://cdn.netbsd.org/pub/NetBSD/NetBSD-11.0/amd64/binary/sets/comp.tar.xz e14cf9f6ea080d90a148918a4f73a3696c473c60a435985f4316a9033abc0b3e https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/11.0_2026Q3/All/gcc14-14.3.0nb3.tgz 8fca3189af23c742b84641c8d861cf1bf485576265da132fd2ee7bb818e6bc50" + options: "--build-skip-test-run -DCMAKE_SYSTEM_NAME=NetBSD -DCMAKE_SYSTEM_PROCESSOR=x86_64" + runs-on: ${{ matrix.image }} env: @@ -896,6 +1163,21 @@ jobs: echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV fi + - name: Prepare sysroot [cross] + if: ${{ matrix.sysroot }} + shell: bash + run: | + mkdir -p /tmp/sysroot + set -- ${{ matrix.sysroot }} + while [[ $# -gt 1 ]]; do + curl --fail --silent --show-error --location --output sysroot.archive "$1" + echo "$2 sysroot.archive" | sha256sum --check + tar -xf sysroot.archive -C /tmp/sysroot + rm sysroot.archive + shift 2 + done + find /tmp/sysroot -name '*.la' -delete + - name: Execute installation shell: bash working-directory: 'libbitcoin-database' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e49fbdf9..cb15272b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,7 +162,7 @@ jobs: cxx: "arm-linux-gnueabihf-g++" flags: "" coverage: "" - package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf" + package: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf qemu-user-static" host: "arm-linux-gnueabihf" options: "--enable-isystem --build-skip-test-run" diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index 229655b15..5382b37c2 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -91,6 +91,13 @@ if ( MSVC ) _WIN32_WINNT=0x0A00 ) endif() +# Link POSIX threads on BSD. +if ( CMAKE_SYSTEM_NAME MATCHES "BSD" ) + set( THREADS_PREFER_PTHREAD_FLAG ON ) + find_package( Threads REQUIRED ) + link_libraries( Threads::Threads ) +endif() + include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) include(CheckCXXSourceCompiles) diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh index e0a5052b3..29952aad7 100755 --- a/builds/cmake/install-cmake.sh +++ b/builds/cmake/install-cmake.sh @@ -355,7 +355,7 @@ main() if [[ -z "${PARALLEL}" ]]; then if [[ ${OS} == Linux ]]; then PARALLEL=$(nproc) - elif [[ ${OS} == Darwin ]] || [[ ${OS} == OpenBSD ]]; then + elif [[ ${OS} == Darwin ]] || [[ ${OS} == *BSD ]]; then PARALLEL=$(sysctl -n hw.ncpu) elif [[ ${OS} == MINGW* ]] || [[ ${OS} == MSYS* ]]; then PARALLEL=${NUMBER_OF_PROCESSORS} @@ -371,15 +371,13 @@ main() # state rationalization of standard build variables - if [[ ${OS} == OpenBSD ]]; then + if [[ ${OS} == *BSD ]]; then make() { gmake "$@"; } fi if [[ -z "${STDLIB}" ]]; then if [[ ${OS} == Darwin ]]; then STDLIB="c++" - elif [[ ${OS} == OpenBSD ]]; then - STDLIB="estdc++" else STDLIB="stdc++" fi @@ -390,8 +388,6 @@ main() if [[ -z "${CC}" ]]; then if [[ ${OS} == Darwin ]]; then export CC="clang" - elif [[ ${OS} == OpenBSD ]]; then - export CC="egcc" fi else msg_verbose "CC using defined value '${CC}'" @@ -400,8 +396,6 @@ main() if [[ -z "${CXX}" ]]; then if [[ ${OS} == Darwin ]]; then export CXX="clang++" - elif [[ ${OS} == OpenBSD ]]; then - export CXX="eg++" fi else msg_verbose "CXX using defined value '${CXX}'" @@ -560,7 +554,7 @@ main() fi fi - if [[ ${OS} == Linux && ${CC} == clang* ]] || [[ ${OS} == OpenBSD ]]; then + if [[ ${OS} == Linux && ${CC} == clang* ]]; then export LDLIBS="-l${STDLIB} ${LDLIBS}" msg_verbose "LDLIBS has been manipulated to encode STDLIB linkage." fi diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh index 07b1c2c61..4f091ef41 100755 --- a/builds/cmake/install-presets.sh +++ b/builds/cmake/install-presets.sh @@ -387,7 +387,7 @@ main() if [[ -z "${PARALLEL}" ]]; then if [[ ${OS} == Linux ]]; then PARALLEL=$(nproc) - elif [[ ${OS} == Darwin ]] || [[ ${OS} == OpenBSD ]]; then + elif [[ ${OS} == Darwin ]] || [[ ${OS} == *BSD ]]; then PARALLEL=$(sysctl -n hw.ncpu) elif [[ ${OS} == MINGW* ]] || [[ ${OS} == MSYS* ]]; then PARALLEL=${NUMBER_OF_PROCESSORS} @@ -403,15 +403,13 @@ main() # state rationalization of standard build variables - if [[ ${OS} == OpenBSD ]]; then + if [[ ${OS} == *BSD ]]; then make() { gmake "$@"; } fi if [[ -z "${STDLIB}" ]]; then if [[ ${OS} == Darwin ]]; then STDLIB="c++" - elif [[ ${OS} == OpenBSD ]]; then - STDLIB="estdc++" else STDLIB="stdc++" fi @@ -422,8 +420,6 @@ main() if [[ -z "${CC}" ]]; then if [[ ${OS} == Darwin ]]; then export CC="clang" - elif [[ ${OS} == OpenBSD ]]; then - export CC="egcc" fi else msg_verbose "CC using defined value '${CC}'" @@ -432,8 +428,6 @@ main() if [[ -z "${CXX}" ]]; then if [[ ${OS} == Darwin ]]; then export CXX="clang++" - elif [[ ${OS} == OpenBSD ]]; then - export CXX="eg++" fi else msg_verbose "CXX using defined value '${CXX}'" @@ -564,7 +558,7 @@ main() fi fi - if [[ ${OS} == Linux && ${CC} == clang* ]] || [[ ${OS} == OpenBSD ]]; then + if [[ ${OS} == Linux && ${CC} == clang* ]]; then export LDLIBS="-l${STDLIB} ${LDLIBS}" msg_verbose "LDLIBS has been manipulated to encode STDLIB linkage." fi diff --git a/builds/cmake/libbitcoin-database-config.cmake.in b/builds/cmake/libbitcoin-database-config.cmake.in index f9152ee91..e31c74813 100644 --- a/builds/cmake/libbitcoin-database-config.cmake.in +++ b/builds/cmake/libbitcoin-database-config.cmake.in @@ -10,6 +10,10 @@ include( CMakeFindDependencyMacro ) include( "${CMAKE_CURRENT_LIST_DIR}/libbitcoin-database-targets.cmake" ) +if ( CMAKE_SYSTEM_NAME MATCHES "BSD" ) + find_dependency( Threads ) +endif() + find_dependency( libbitcoin-system 4.0.0 REQUIRED ) check_required_components(@PROJECT_NAME@) diff --git a/builds/gnu/configure.ac b/builds/gnu/configure.ac index 13d1713c2..fb9314ce2 100644 --- a/builds/gnu/configure.ac +++ b/builds/gnu/configure.ac @@ -93,6 +93,13 @@ AC_SUBST([LIBTOOL_DEPS]) # Determine C++ compiler to use. AC_PROG_CXX +# Link POSIX threads on BSD. +AS_CASE([${host_os}], [*bsd*], + [AX_PTHREAD([], [AC_MSG_ERROR([POSIX threads are required.])]) + LIBS="${PTHREAD_LIBS} ${LIBS}" + CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" + CXXFLAGS="${CXXFLAGS} ${PTHREAD_CFLAGS}"]) + # Enable sed for substitution. AC_PROG_SED diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh index 8c2321a2c..6490d44e5 100755 --- a/builds/gnu/install-gnu.sh +++ b/builds/gnu/install-gnu.sh @@ -360,7 +360,7 @@ main() if [[ -z "${PARALLEL}" ]]; then if [[ ${OS} == Linux ]]; then PARALLEL=$(nproc) - elif [[ ${OS} == Darwin ]] || [[ ${OS} == OpenBSD ]]; then + elif [[ ${OS} == Darwin ]] || [[ ${OS} == *BSD ]]; then PARALLEL=$(sysctl -n hw.ncpu) elif [[ ${OS} == MINGW* ]] || [[ ${OS} == MSYS* ]]; then PARALLEL=${NUMBER_OF_PROCESSORS} @@ -376,15 +376,13 @@ main() # state rationalization of standard build variables - if [[ ${OS} == OpenBSD ]]; then + if [[ ${OS} == *BSD ]]; then make() { gmake "$@"; } fi if [[ -z "${STDLIB}" ]]; then if [[ ${OS} == Darwin ]]; then STDLIB="c++" - elif [[ ${OS} == OpenBSD ]]; then - STDLIB="estdc++" else STDLIB="stdc++" fi @@ -395,8 +393,6 @@ main() if [[ -z "${CC}" ]]; then if [[ ${OS} == Darwin ]]; then export CC="clang" - elif [[ ${OS} == OpenBSD ]]; then - export CC="egcc" fi else msg_verbose "CC using defined value '${CC}'" @@ -405,8 +401,6 @@ main() if [[ -z "${CXX}" ]]; then if [[ ${OS} == Darwin ]]; then export CXX="clang++" - elif [[ ${OS} == OpenBSD ]]; then - export CXX="eg++" fi else msg_verbose "CXX using defined value '${CXX}'" @@ -594,7 +588,7 @@ main() fi fi - if [[ ${OS} == Linux && ${CC} == clang* ]] || [[ ${OS} == OpenBSD ]]; then + if [[ ${OS} == Linux && ${CC} == clang* ]]; then export LDLIBS="-l${STDLIB} ${LDLIBS}" msg_verbose "LDLIBS has been manipulated to encode STDLIB linkage." fi diff --git a/builds/msvc/build-msvc.cmd b/builds/msvc/build-msvc.cmd index 3dd95c42d..15d632d56 100644 --- a/builds/msvc/build-msvc.cmd +++ b/builds/msvc/build-msvc.cmd @@ -195,16 +195,15 @@ if "!libbitcoin_database_TAG!" == "" ( if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% ) - call :build_msbuild "libbitcoin-database" "builds\msvc\%proj_version%" "libbitcoin-database" "!REMAPPED_PARAMS!" + set "TARGETS=" + set "TARGETS=!TARGETS!;libbitcoin-database" + if not "!BUILD_SKIP_TESTS!" == "yes" ( + set "TARGETS=!TARGETS!;libbitcoin-database-test" + ) + call :build_msbuild "libbitcoin-database" "builds\msvc\%proj_version%" "!TARGETS:~1!" "!REMAPPED_PARAMS!" if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% ) - if not "!BUILD_SKIP_TESTS!" == "yes" ( - call :build_msbuild "libbitcoin-database" "builds\msvc\%proj_version%" "libbitcoin-database-test" "!REMAPPED_PARAMS!" - if %ERRORLEVEL% neq 0 ( - exit /b %ERRORLEVEL% - ) - ) call :pop_directory if %ERRORLEVEL% neq 0 ( @@ -452,7 +451,7 @@ if "!libbitcoin_database_TAG!" == "" ( if not "%TARGET%" == "" ( if not "!BUILD_MODE!" == "" ( - set "TARGET_ARG=/target:%TARGET%:!BUILD_MODE!" + set "TARGET_ARG=/target:!TARGET:;=:%BUILD_MODE%;!:!BUILD_MODE!" ) else ( set "TARGET_ARG=/target:%TARGET%" ) @@ -471,7 +470,12 @@ if "!libbitcoin_database_TAG!" == "" ( set "COMPILER_ARG=" if "!BUILD_COMPILER!" == "clang" ( - set "COMPILER_ARG=/p:Option-clang=true " + set "COMPILER_ARG=/p:PlatformToolset=ClangCL " + ) + + set "TOOLS_ARG=" + if "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( + set "TOOLS_ARG=/p:PreferredToolArchitecture=x64 " ) call :push_directory "!BUILD_SRC_DIR!\%PROJECT%\%RELATIVE_PATH%\!BUILD_VERSION!" @@ -484,10 +488,10 @@ if "!libbitcoin_database_TAG!" == "" ( exit /b %ERRORLEVEL% ) - !MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_ARG!!COMPILER_ARG!/p:Platform=!BUILD_PLATFORM! /p:Configuration=!BUILD_CONFIG! /p:PreferredToolArchitecture=x64 %TARGET_ARG% %PROJECT%.sln /p:PreBuildEventUseInBuild=false /p:PostBuildEventUseInBuild=false !UNHANDLED_ARGS! !ADDITIONAL_PARAMS! + !MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_ARG!!COMPILER_ARG!!TOOLS_ARG!/p:Platform=!BUILD_PLATFORM! /p:Configuration=!BUILD_CONFIG! %TARGET_ARG% %PROJECT%.sln /p:PreBuildEventUseInBuild=false /p:PostBuildEventUseInBuild=false !UNHANDLED_ARGS! !ADDITIONAL_PARAMS! if %ERRORLEVEL% neq 0 ( - call :msg_error "!MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_ARG!!COMPILER_ARG!/p:Platform=!BUILD_PLATFORM! /p:Configuration=!BUILD_CONFIG! /p:PreferredToolArchitecture=x64 %TARGET_ARG% %PROJECT%.sln /p:PreBuildEventUseInBuild=false /p:PostBuildEventUseInBuild=false !UNHANDLED_ARGS! !ADDITIONAL_PARAMS!" + call :msg_error "!MSBUILD_EXE! /verbosity:!MSBUILD_VERBOSE! !SYMBOLS_ARG!!COMPILER_ARG!!TOOLS_ARG!/p:Platform=!BUILD_PLATFORM! /p:Configuration=!BUILD_CONFIG! %TARGET_ARG% %PROJECT%.sln /p:PreBuildEventUseInBuild=false /p:PostBuildEventUseInBuild=false !UNHANDLED_ARGS! !ADDITIONAL_PARAMS!" call :pop_directory exit /b 1 ) diff --git a/builds/msvc/properties/Common.props b/builds/msvc/properties/Common.props index c9b4ff60f..f5abe044e 100644 --- a/builds/msvc/properties/Common.props +++ b/builds/msvc/properties/Common.props @@ -11,17 +11,9 @@ - x64 + x64 - - - false - - - clang-cl.exe - $(VCInstallDir)Tools\Llvm\x64\bin - UNICODE;_UNICODE;%(PreprocessorDefinitions) @@ -46,10 +38,12 @@ stdcpp17 stdcpp20 stdcpp20 + stdcpp20 false true true true + true @@ -59,7 +53,7 @@ - + --target=i686-pc-windows-msvc %(AdditionalOptions) --target=aarch64-pc-windows-msvc %(AdditionalOptions) @@ -69,7 +63,7 @@ - + -msse4.1 -msha %(AdditionalOptions) -mavx2 -msha512 %(AdditionalOptions) @@ -81,7 +75,7 @@ - + armv8-a armv8.2-a @@ -90,7 +84,7 @@ %(ArmExtensions)+sha3 - + -march=%(ArmBase)%(ArmExtensions) %(AdditionalOptions) diff --git a/builds/msvc/properties/Messages.props b/builds/msvc/properties/Messages.props index 8e8d2ae4b..a66b49ff4 100644 --- a/builds/msvc/properties/Messages.props +++ b/builds/msvc/properties/Messages.props @@ -8,7 +8,6 @@ - From e6c802c8df88ca9901eefcaee168fd48508d33bb Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Sun, 8 Nov 2026 22:43:56 -0500 Subject: [PATCH 2/2] Regenerate artifacts. --- builds/cmake/install-cmake.sh | 79 +++++++++++++++++++------------- builds/cmake/install-presets.sh | 71 +++++++++++++++++------------ builds/gnu/install-gnu.sh | 81 +++++++++++++++++++-------------- 3 files changed, 138 insertions(+), 93 deletions(-) diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh index 29952aad7..838be528d 100755 --- a/builds/cmake/install-cmake.sh +++ b/builds/cmake/install-cmake.sh @@ -162,37 +162,37 @@ main() CONFIGURE_OPTIONS_ORIGINAL=("$@") CONFIGURE_OPTIONS=("$@") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-libsecp256k1/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir-relative/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-config=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-link=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-test-run/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--prefix=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aes/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha2/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha3/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx2/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512ifma/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avxifma/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-shani/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha512/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sse41/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aesni/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-vaes/}") + remove_configure_option "--build-libsecp256k1" + remove_configure_option "--build-src-dir=*" + remove_configure_option "--build-obj-dir=*" + remove_configure_option "--build-obj-dir-relative" + remove_configure_option "--build-limit=*" + remove_configure_option "--build-config=*" + remove_configure_option "--build-link=*" + remove_configure_option "--build-full-repositories" + remove_configure_option "--build-post-install-clean" + remove_configure_option "--build-skip-tests" + remove_configure_option "--build-skip-test-run" + remove_configure_option "--build-parallel=*" + remove_configure_option "--build-use-local-src" + remove_configure_option "--prefix=*" + remove_configure_option "--hardware-optimized" + remove_configure_option "--noninteractive" + remove_configure_option "--verbose" + remove_configure_option "--help" + remove_configure_option "-h" + remove_configure_option "--hardware-aes" + remove_configure_option "--hardware-sha2" + remove_configure_option "--hardware-sha3" + remove_configure_option "--hardware-avx2" + remove_configure_option "--hardware-avx512" + remove_configure_option "--hardware-avx512ifma" + remove_configure_option "--hardware-avxifma" + remove_configure_option "--hardware-shani" + remove_configure_option "--hardware-sha512" + remove_configure_option "--hardware-sse41" + remove_configure_option "--hardware-aesni" + remove_configure_option "--hardware-vaes" CONFIGURE_OPTIONS_CMAKE=("${CONFIGURE_OPTIONS[@]}") msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}" msg_verbose "*** SANITIZED: ${CONFIGURE_OPTIONS[*]}" @@ -438,7 +438,7 @@ main() fi if [[ ${HARDWARE_PLATFORM_ARM64} == "yes" ]]; then - ARCHTUNE="${ARCHBASE}${ARCHSUFFIX}" + ARCHTUNE="-march=${ARCHBASE}${ARCHSUFFIX}" fi # Platform options: x64 @@ -1056,6 +1056,21 @@ display_configure_options() done } +remove_configure_option() +{ + local PATTERN="$1" + local RETAINED=() + local OPTION + + for OPTION in "${CONFIGURE_OPTIONS[@]}"; do + if [[ ${OPTION} != ${PATTERN} ]]; then + RETAINED=("${RETAINED[@]}" "${OPTION}") + fi + done + + CONFIGURE_OPTIONS=("${RETAINED[@]}") +} + enable_exit_on_error() { diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh index 4f091ef41..1e151bbae 100755 --- a/builds/cmake/install-presets.sh +++ b/builds/cmake/install-presets.sh @@ -148,33 +148,33 @@ main() CONFIGURE_OPTIONS_ORIGINAL=("$@") CONFIGURE_OPTIONS=("$@") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-libsecp256k1/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-preset=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-test-run/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aes/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha2/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha3/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx2/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512ifma/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avxifma/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-shani/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha512/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sse41/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aesni/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-vaes/}") + remove_configure_option "--build-libsecp256k1" + remove_configure_option "--build-preset=*" + remove_configure_option "--build-src-dir=*" + remove_configure_option "--build-limit=*" + remove_configure_option "--build-full-repositories" + remove_configure_option "--build-post-install-clean" + remove_configure_option "--build-skip-tests" + remove_configure_option "--build-skip-test-run" + remove_configure_option "--build-parallel=*" + remove_configure_option "--build-use-local-src" + remove_configure_option "--hardware-optimized" + remove_configure_option "--noninteractive" + remove_configure_option "--verbose" + remove_configure_option "--help" + remove_configure_option "-h" + remove_configure_option "--hardware-aes" + remove_configure_option "--hardware-sha2" + remove_configure_option "--hardware-sha3" + remove_configure_option "--hardware-avx2" + remove_configure_option "--hardware-avx512" + remove_configure_option "--hardware-avx512ifma" + remove_configure_option "--hardware-avxifma" + remove_configure_option "--hardware-shani" + remove_configure_option "--hardware-sha512" + remove_configure_option "--hardware-sse41" + remove_configure_option "--hardware-aesni" + remove_configure_option "--hardware-vaes" CONFIGURE_OPTIONS_CMAKE=("${CONFIGURE_OPTIONS[@]}") msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}" msg_verbose "*** SANITIZED: ${CONFIGURE_OPTIONS[*]}" @@ -470,7 +470,7 @@ main() fi if [[ ${HARDWARE_PLATFORM_ARM64} == "yes" ]]; then - ARCHTUNE="${ARCHBASE}${ARCHSUFFIX}" + ARCHTUNE="-march=${ARCHBASE}${ARCHSUFFIX}" fi # Platform options: x64 @@ -1111,6 +1111,21 @@ display_configure_options() done } +remove_configure_option() +{ + local PATTERN="$1" + local RETAINED=() + local OPTION + + for OPTION in "${CONFIGURE_OPTIONS[@]}"; do + if [[ ${OPTION} != ${PATTERN} ]]; then + RETAINED=("${RETAINED[@]}" "${OPTION}") + fi + done + + CONFIGURE_OPTIONS=("${RETAINED[@]}") +} + enable_exit_on_error() { diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh index 6490d44e5..40e06e858 100755 --- a/builds/gnu/install-gnu.sh +++ b/builds/gnu/install-gnu.sh @@ -160,38 +160,38 @@ main() CONFIGURE_OPTIONS_ORIGINAL=("$@") CONFIGURE_OPTIONS=("$@") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-libsecp256k1/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-src-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-obj-dir-relative/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-limit=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-config=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-link=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-full-repositories/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-post-install-clean/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-tests/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-skip-test-run/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-valgrind=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-parallel=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--build-use-local-src/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--prefix=*/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-optimized/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--noninteractive/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--verbose/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--help/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#-h/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aes/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha2/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha3/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx2/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avx512ifma/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-avxifma/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-shani/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sha512/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-sse41/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-aesni/}") - CONFIGURE_OPTIONS=("${CONFIGURE_OPTIONS[@]/#--hardware-vaes/}") + remove_configure_option "--build-libsecp256k1" + remove_configure_option "--build-src-dir=*" + remove_configure_option "--build-obj-dir=*" + remove_configure_option "--build-obj-dir-relative" + remove_configure_option "--build-limit=*" + remove_configure_option "--build-config=*" + remove_configure_option "--build-link=*" + remove_configure_option "--build-full-repositories" + remove_configure_option "--build-post-install-clean" + remove_configure_option "--build-skip-tests" + remove_configure_option "--build-skip-test-run" + remove_configure_option "--build-valgrind=*" + remove_configure_option "--build-parallel=*" + remove_configure_option "--build-use-local-src" + remove_configure_option "--prefix=*" + remove_configure_option "--hardware-optimized" + remove_configure_option "--noninteractive" + remove_configure_option "--verbose" + remove_configure_option "--help" + remove_configure_option "-h" + remove_configure_option "--hardware-aes" + remove_configure_option "--hardware-sha2" + remove_configure_option "--hardware-sha3" + remove_configure_option "--hardware-avx2" + remove_configure_option "--hardware-avx512" + remove_configure_option "--hardware-avx512ifma" + remove_configure_option "--hardware-avxifma" + remove_configure_option "--hardware-shani" + remove_configure_option "--hardware-sha512" + remove_configure_option "--hardware-sse41" + remove_configure_option "--hardware-aesni" + remove_configure_option "--hardware-vaes" CONFIGURE_OPTIONS_CMAKE=() CONFIGURE_OPTIONS_GNU=("${CONFIGURE_OPTIONS[@]}") msg_verbose "*** ARGUMENTS: ${CONFIGURE_OPTIONS_ORIGINAL[*]}" @@ -446,7 +446,7 @@ main() fi if [[ ${HARDWARE_PLATFORM_ARM64} == "yes" ]]; then - ARCHTUNE="${ARCHBASE}${ARCHSUFFIX}" + ARCHTUNE="-march=${ARCHBASE}${ARCHSUFFIX}" fi # Platform options: x64 @@ -1128,6 +1128,21 @@ display_configure_options() done } +remove_configure_option() +{ + local PATTERN="$1" + local RETAINED=() + local OPTION + + for OPTION in "${CONFIGURE_OPTIONS[@]}"; do + if [[ ${OPTION} != ${PATTERN} ]]; then + RETAINED=("${RETAINED[@]}" "${OPTION}") + fi + done + + CONFIGURE_OPTIONS=("${RETAINED[@]}") +} + enable_exit_on_error() {