Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
290 changes: 286 additions & 4 deletions .github/workflows/ci-expanded.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
7 changes: 7 additions & 0 deletions builds/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
91 changes: 50 additions & 41 deletions builds/cmake/install-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[*]}"
Expand Down Expand Up @@ -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}
Expand All @@ -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
Expand All @@ -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}'"
Expand All @@ -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}'"
Expand Down Expand Up @@ -444,7 +438,7 @@ main()
fi

if [[ ${HARDWARE_PLATFORM_ARM64} == "yes" ]]; then
ARCHTUNE="${ARCHBASE}${ARCHSUFFIX}"
ARCHTUNE="-march=${ARCHBASE}${ARCHSUFFIX}"
fi

# Platform options: x64
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1062,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()
{
Expand Down
83 changes: 46 additions & 37 deletions builds/cmake/install-presets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[*]}"
Expand Down Expand Up @@ -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}
Expand All @@ -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
Expand All @@ -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}'"
Expand All @@ -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}'"
Expand Down Expand Up @@ -476,7 +470,7 @@ main()
fi

if [[ ${HARDWARE_PLATFORM_ARM64} == "yes" ]]; then
ARCHTUNE="${ARCHBASE}${ARCHSUFFIX}"
ARCHTUNE="-march=${ARCHBASE}${ARCHSUFFIX}"
fi

# Platform options: x64
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1117,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()
{
Expand Down
4 changes: 4 additions & 0 deletions builds/cmake/libbitcoin-database-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@)
7 changes: 7 additions & 0 deletions builds/gnu/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading
Loading