Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update toolchains, deps and further cleanup #1857

Merged
merged 36 commits into from
Apr 4, 2023
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3817309
Suppress depends related superfluous warnings
prasannavl Mar 29, 2023
4d01ec8
Fix passthrough string quote
prasannavl Mar 29, 2023
074b619
Fix windres, bcrypt failures
prasannavl Apr 2, 2023
8419b02
Cleanup build, workflows, dockerfiles
prasannavl Apr 3, 2023
3002caf
Cleanup comments
prasannavl Apr 3, 2023
a8e8585
Refactor default var setup
prasannavl Apr 3, 2023
779bac9
Cleanup comments
prasannavl Apr 3, 2023
d02392b
Add safe_rm_rf and simplify left file list
prasannavl Apr 3, 2023
71788b4
Fix shellcheck
prasannavl Apr 3, 2023
7255c60
Fix arm core images
prasannavl Apr 3, 2023
7855ba6
More cleanup, unify packaging, safer rm
prasannavl Apr 3, 2023
f7fa1d9
Apply default conf across all arch, conf args append
prasannavl Apr 3, 2023
d70597b
Apply glibc compat only on linux builds
prasannavl Apr 3, 2023
e3e4b23
Clean up obsolete comments
prasannavl Apr 3, 2023
0fa27ad
Cleanup unmaintained files
prasannavl Apr 3, 2023
89fe9a9
Remove install.md
prasannavl Apr 3, 2023
41b58a2
Remove libdeficonsensus dyn lib, defi-wallet
prasannavl Apr 4, 2023
c798744
Enable static linking
prasannavl Apr 4, 2023
570d1b6
Revert boost changes
prasannavl Apr 4, 2023
98fb360
Merge branch 'master' into pvl/cleanup-unmaintained-files
prasannavl Apr 4, 2023
33cb49d
Remove outdated man pages
prasannavl Apr 4, 2023
8f1ffaa
Remove debian packaging related file
prasannavl Apr 4, 2023
34eb5fb
Bump boost min to 1.77, remove obsolete checks
prasannavl Apr 4, 2023
5d5fbf3
Revert boost config cleanup
prasannavl Apr 4, 2023
cda2d7d
More cleanups, nsis, gitian
prasannavl Apr 4, 2023
14184b7
Remove boost reduce exports change
prasannavl Apr 4, 2023
e2830f9
Cleanup boost obsolete check
prasannavl Apr 4, 2023
435c625
Reorganize scripts, merge share and contrib
prasannavl Apr 4, 2023
b9249a7
Fix docker script
prasannavl Apr 4, 2023
ed35ac6
Remove wallet tool test
prasannavl Apr 4, 2023
a4ed14d
static libgcc, disable tests and benches on CI builds
prasannavl Apr 4, 2023
2fc1d78
Fix CI builds to use consistent compilers
prasannavl Apr 4, 2023
6eb1b87
Better consistency in toolchains
prasannavl Apr 4, 2023
c1ebadd
Remove cdrkit, libdmg and switch to docker multiplatform base
prasannavl Apr 4, 2023
9bc463f
Update cppcheck version
prasannavl Apr 4, 2023
15d1a4f
Merge branch 'master' into pvl/post-cleanup
prasannavl Apr 4, 2023
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
Prev Previous commit
Next Next commit
Refactor default var setup
  • Loading branch information
prasannavl committed Apr 3, 2023
commit a8e8585524e6fcf34ae9aad412df37cd511301c4
88 changes: 51 additions & 37 deletions make.sh
Original file line number Diff line number Diff line change
@@ -16,37 +16,11 @@ setup_vars() {
DOCKERFILE=${DOCKERFILE:-""}
DOCKERFILES_DIR=${DOCKERFILES_DIR:-"./contrib/dockerfiles"}
RELEASE_DIR=${RELEASE_DIR:-"./build"}
CLANG_DEFAULT_VERSION=${CLANG_DEFAULT_VERSION:-"16"}

local default_target=""
if [[ "${OSTYPE}" == "darwin"* ]]; then
default_target="x86_64-apple-darwin18"
elif [[ "${OSTYPE}" == "msys" ]]; then
default_target="x86_64-w64-mingw32"
else
# Note: make.sh only formally supports auto selection for
# windows under msys, mac os and debian derivatives to build on.
# Also note: Support for auto selection on make.sh does not imply
# support for the architecture.
# Only supported architectures are the ones with release builds
# enabled on the CI.
local dpkg_arch=""
dpkg_arch=$(dpkg --print-architecture || true)
if [[ "$dpkg_arch" == "armhf" ]]; then
default_target="arm-linux-gnueabihf"
elif [[ "$dpkg_arch" == "aarch64" ]]; then
default_target="aarch64-linux-gnu"
else
# Global default if we can't determine it from the
# above, which are our only supported list for auto select
default_target="x86_64-pc-linux-gnu"
fi
fi
CLANG_DEFAULT_VERSION=${CLANG_DEFAULT_VERSION:-"16"}
MAKE_DEBUG=${MAKE_DEBUG:-"0"}

# shellcheck disable=SC2206
# This intentionally word-splits the array as env arg can only be strings.
# Other options available: x86_64-w64-mingw32 x86_64-apple-darwin18
TARGET=${TARGET:-"${default_target}"}
TARGET=${TARGET:-"$(get_default_target)"}

local default_compiler_flags=""
if [[ "${TARGET}" == "x86_64-pc-linux-gnu" ]]; then
@@ -62,19 +36,15 @@ setup_vars() {

MAKE_JOBS=${MAKE_JOBS:-"${default_jobs}"}
MAKE_COMPILER=${MAKE_COMPILER:-"${default_compiler_flags}"}

MAKE_CONF_ARGS="${MAKE_CONF_ARGS:-$(get_default_conf_args)}"
MAKE_CONF_ARGS="${MAKE_COMPILER} ${MAKE_CONF_ARGS:-}"
MAKE_ARGS=${MAKE_ARGS:-}
MAKE_DEPS_ARGS=${MAKE_DEPS_ARGS:-}
MAKE_DEBUG=${MAKE_DEBUG:-"0"}
if [[ "${MAKE_DEBUG}" == "1" ]]; then
MAKE_CONF_ARGS="${MAKE_CONF_ARGS} --enable-debug";
fi

if [[ "$TARGET" =~ a(rm|arch64).* ]]; then
MAKE_CONF_ARGS="${MAKE_CONF_ARGS} --enable-glibc-back-compat";
MAKE_CONF_ARGS="${MAKE_CONF_ARGS} --enable-reduce-exports";
MAKE_CONF_ARGS="${MAKE_CONF_ARGS} LDFLAGS=-static-libstdc++";
fi
MAKE_ARGS=${MAKE_ARGS:-}
MAKE_DEPS_ARGS=${MAKE_DEPS_ARGS:-}
}

main() {
@@ -357,6 +327,50 @@ docker_purge() {

# -------------- Misc -----------------

get_default_target() {
local default_target=""
if [[ "${OSTYPE}" == "darwin"* ]]; then
default_target="x86_64-apple-darwin18"
elif [[ "${OSTYPE}" == "msys" ]]; then
default_target="x86_64-w64-mingw32"
else
# Note: make.sh only formally supports auto selection for
# windows under msys, mac os and debian derivatives to build on.
# Also note: Support for auto selection on make.sh does not imply
# support for the architecture.
# Only supported architectures are the ones with release builds
# enabled on the CI.
local dpkg_arch=""
dpkg_arch=$(dpkg --print-architecture || true)
if [[ "$dpkg_arch" == "armhf" ]]; then
default_target="arm-linux-gnueabihf"
elif [[ "$dpkg_arch" == "aarch64" ]]; then
default_target="aarch64-linux-gnu"
else
# Global default if we can't determine it from the
# above, which are our only supported list for auto select
default_target="x86_64-pc-linux-gnu"
fi
fi

# shellcheck disable=SC2206
# This intentionally word-splits the array as env arg can only be strings.
# Other options available: x86_64-w64-mingw32 x86_64-apple-darwin18
echo "$default_target"
}

get_default_conf_args() {
local conf_args=""
# Add arm specific flags, but only if make_conf_args env is empty.
# If it's explicitly being overridden and leave it as it is
if [[ "$TARGET" =~ a(rm|arch64).* ]]; then
conf_args="${conf_args} --enable-glibc-back-compat";
conf_args="${conf_args} --enable-reduce-exports";
conf_args="${conf_args} LDFLAGS=-static-libstdc++";
fi
echo "$conf_args"
}

sign() {
# TODO: generate sha sums and sign
: