aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-05-05 09:12:49 +0100
committerfanquake <fanquake@gmail.com>2022-05-05 09:36:26 +0100
commit1ad5d5088d69939b0551de31d6c33c03153697c5 (patch)
tree240ebf72ca96f8681df02c3f4ba9da5fe5d5e14b
parent0d080a183bfc401c5236e5ec7df82943f1b112fc (diff)
parentefa3a807a677659b0b74cdeda944e7c8ce0157fb (diff)
downloadbitcoin-1ad5d5088d69939b0551de31d6c33c03153697c5.tar.xz
Merge bitcoin/bitcoin#24866: build: No longer need to hack the `PATH` variable in `config.site`
efa3a807a677659b0b74cdeda944e7c8ce0157fb build: No longer need to hack the `PATH` variable in `config.site` (Hennadii Stepanov) f3af4f7a182f81269c193d5d1fd0effb9161f7c6 build: Let the depends build system define a path to `dsymutil` tool (Hennadii Stepanov) b0a8ddabe531b5d848ad798ccbccdf8f46671223 build: Pass missed darwin-specific tools via `config.site` (Hennadii Stepanov) f87594da14dfc61a5c6163f8e91b8395a28f690e build: No need to provide defaults for darwin-specific tools (Hennadii Stepanov) 80cd99322f1369ee694d0dd125989d5a1b123ba9 scripted-diff: Rename INSTALLNAMETOOL -> INSTALL_NAME_TOOL (Hennadii Stepanov) a4fd440741a507d3e9be0e55e84d566ade69f798 build: Pass missed `strip` tool via `config.site` (Hennadii Stepanov) Pull request description: This PR adds lacking definitions of absolute paths to some tools in the depends build system. This improvement makes possible to keep the `PATH` variable untouched during configuration. Also see https://github.com/bitcoin/bitcoin/pull/24566#discussion_r851125442. #### Guix builds on `x86_64`: ``` $ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum 93fa58bf2a1f5c15c5a547c014036ac79761e5c9622bd5099408ce570b39f02f guix-build-efa3a807a677/output/aarch64-linux-gnu/SHA256SUMS.part ef5f53348404ba973dceaf088a4d47dfd0f1fa3d3bf75bdd723b043431de005d guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu-debug.tar.gz 6688b2295d564b32ea676c0540c43cdc5211322eddc87e0967b764284e847368 guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu.tar.gz 4abb3428be477aa7360611689fd28950f30dbbac6a95c454095367d8df11ad72 guix-build-efa3a807a677/output/arm-linux-gnueabihf/SHA256SUMS.part 8dd33389170e83812821d5dd68741db96af1376035ba40af0215a7ae95dcf7fc guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf-debug.tar.gz 544e97eb88b2a44c8ceb9660399eb5d49d75e07ff59fc03a701a595bacea0491 guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf.tar.gz 219faf1131bdcffffd5979eafd2beabc4a300081f8b1df184852b7183dfbc0e8 guix-build-efa3a807a677/output/arm64-apple-darwin/SHA256SUMS.part 602a417bfa7971fb26d0fe9921d2348fd0d01a5bcf0af93f8a9d50112076e0eb guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.dmg 0dcb197420844da8da3f528a1d986628f7b63adb1e83353d63e8a84da59abc42 guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.tar.gz 10efdd33418234a8288c27a614f50e9ff45efbd681fa1c0e173142b6d267cdb8 guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin.tar.gz e5ef02adeb9bcb4675972b0dc233a904006b0940d721049eeb94b14cda34872e guix-build-efa3a807a677/output/dist-archive/bitcoin-efa3a807a677.tar.gz a75d2a49b7a8ab1c849e1badff5049a417519f0154b65335a8717d01b8b6ed62 guix-build-efa3a807a677/output/powerpc64-linux-gnu/SHA256SUMS.part aef63d196487dd0bc597fd53633ac889149f1a126c651ea55f3bec11a092c460 guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu-debug.tar.gz ddc7913eed26270be271a8712bf351d562d57c746810ea3b7b4101aea8cb6d89 guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu.tar.gz 83bbf4b1af07a2cf7d6014de7c885f0998dd38afacdb5242f5f56505ee704f17 guix-build-efa3a807a677/output/powerpc64le-linux-gnu/SHA256SUMS.part c9d5d95de98ed987b63a78d4f6e082cb36d5ec3ba71d130601e03d3ebfbd208d guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu-debug.tar.gz 88ed6ec82dd4c1c656fe80b4c49f91a4c15c2ab798dbbe16a3d57393f17d6f3a guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu.tar.gz 7b8e7b3b1e68a2ea0e37c058b284da11e9721ef4d1bc2761ed003b2061358d5f guix-build-efa3a807a677/output/riscv64-linux-gnu/SHA256SUMS.part a5de4bedf2b4bc5ab25db21b942076897cabe8a40ce9b0637488af6b4d90693a guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu-debug.tar.gz 53023994202887778a001ce00daf7cdc135b9e6c3be034f31645ab4ba5f078c6 guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu.tar.gz c6664a61b81dfa080c466d2252a6db70165acbea6cfad51ada16970e9c08bb6f guix-build-efa3a807a677/output/x86_64-apple-darwin/SHA256SUMS.part a528569ae4bf5e19401311649086a2d8e3fa5251b44550e623722968dfb111ea guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.dmg 9b0384cce7605b546ed581074955f2b9c33cf0817453842036e6224b423b814b guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.tar.gz ebdbd2f3a6406233f27ee48be0ab014991fedba3c0831f79f4a4873f7abf3d7a guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin.tar.gz 05a8f71fe67f7193e71ea8bbe6f8df2e651b8ac7da3075ba25aacdd3515f7757 guix-build-efa3a807a677/output/x86_64-linux-gnu/SHA256SUMS.part 30a17a1e3d795ea390cd1e0f3ef74c989b5768ae7415740fcca46befe4cb7206 guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu-debug.tar.gz 66db846f3fd739089afa5c339659dbf5efb50572f2d29f8288bf24be9e8f1dd0 guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu.tar.gz bd3c44890823badcf6d296fa674de14275684be7593f4ab21c0316873ddd8652 guix-build-efa3a807a677/output/x86_64-w64-mingw32/SHA256SUMS.part 6ce3ee21212ff2a95e085073a48194476ade2d5ff94cc1c8ec58a8ae7db8f1fa guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-debug.zip 5e697c05537cfb2ce2ed95fef25e261e2cfa83a31fd548a98118580c4bbff2e4 guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-setup-unsigned.exe 4cc2bcff98845c792c0ed12a2ea407b25fb85b2d4250d88dca94ed68f42e714d guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-unsigned.tar.gz 9d5d72271dc6b820e63b30c5c3f9015309777793100b4e2b6ab0c8ea0f7b4aed guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64.zip ``` ACKs for top commit: laanwj: Tested ACK efa3a807a677659b0b74cdeda944e7c8ce0157fb. I get the same build output as in OP: vincenzopalazzo: Re ACK https://github.com/bitcoin/bitcoin/commit/efa3a807a677659b0b74cdeda944e7c8ce0157fb Tree-SHA512: 6d35c11fc307221d61ad250bbdcdc09dbc49adbe43f7a94acb56190ae9f005d23fc22941ea59e3eb62811f8974e39d3617e0c47071232d4b1b0bc2e2e2782e88
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus2
-rw-r--r--depends/Makefile3
-rw-r--r--depends/builders/darwin.mk2
-rw-r--r--depends/builders/default.mk4
-rw-r--r--depends/config.site.in23
-rw-r--r--depends/hosts/darwin.mk2
-rw-r--r--depends/hosts/default.mk4
9 files changed, 33 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am
index dd658170b3..05e89f12b7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -133,7 +133,7 @@ $(OSX_DMG): deploydir
$(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ $(APP_DIST_DIR) -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH))
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
- INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
+ INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
endif !BUILD_DARWIN
diff --git a/configure.ac b/configure.ac
index ea97b1b1d9..a671d31f30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -781,7 +781,7 @@ case $host in
;;
*)
AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil])
- AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], [install_name_tool])
+ AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool])
AC_PATH_TOOL([OTOOL], [otool], [otool])
AC_PATH_PROGS([XORRISOFS], [xorrisofs], [xorrisofs])
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index cc24e0317b..2420539b7c 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -211,7 +211,7 @@ def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]:
return libraries
def runInstallNameTool(action: str, *args):
- installnametoolbin=os.getenv("INSTALLNAMETOOL", "install_name_tool")
+ installnametoolbin=os.getenv("INSTALL_NAME_TOOL", "install_name_tool")
run([installnametoolbin, "-"+action] + list(args), check=True)
def changeInstallName(oldName: str, newName: str, binaryPath: str, verbose: int):
diff --git a/depends/Makefile b/depends/Makefile
index b901533786..20f5f6b2c6 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -222,6 +222,9 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
-e 's|@RANLIB@|$(host_RANLIB)|' \
-e 's|@NM@|$(host_NM)|' \
-e 's|@STRIP@|$(host_STRIP)|' \
+ -e 's|@OTOOL@|$(host_OTOOL)|' \
+ -e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
+ -e 's|@DSYMUTIL@|$(host_DSYMUTIL)|' \
-e 's|@build_os@|$(build_os)|' \
-e 's|@host_os@|$(host_os)|' \
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk
index ced01229dd..8ed82b276d 100644
--- a/depends/builders/darwin.mk
+++ b/depends/builders/darwin.mk
@@ -6,6 +6,7 @@ build_darwin_STRIP:=$(shell xcrun -f strip)
build_darwin_OTOOL:=$(shell xcrun -f otool)
build_darwin_NM:=$(shell xcrun -f nm)
build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
+build_darwin_DSYMUTIL:=$(shell xcrun -f dsymutil)
build_darwin_SHA256SUM=shasum -a 256
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
@@ -19,6 +20,7 @@ darwin_LIBTOOL:=$(shell xcrun -f libtool)
darwin_OTOOL:=$(shell xcrun -f otool)
darwin_NM:=$(shell xcrun -f nm)
darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
+darwin_DSYMUTIL:=$(shell xcrun -f dsymutil)
darwin_native_binutils=
darwin_native_toolchain=
diff --git a/depends/builders/default.mk b/depends/builders/default.mk
index 0370fb9acb..cc6dec66c2 100644
--- a/depends/builders/default.mk
+++ b/depends/builders/default.mk
@@ -5,15 +5,13 @@ default_build_TAR = tar
default_build_RANLIB = ranlib
default_build_STRIP = strip
default_build_NM = nm
-default_build_OTOOL = otool
-default_build_INSTALL_NAME_TOOL = install_name_tool
define add_build_tool_func
build_$(build_os)_$1 ?= $$(default_build_$1)
build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)
build_$1=$$(build_$(build_arch)_$(build_os)_$1)
endef
-$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var))))
+$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_build_tool_func,$(var))))
define add_build_flags_func
build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1)
build_$1=$$(build_$(build_arch)_$(build_os)_$1)
diff --git a/depends/config.site.in b/depends/config.site.in
index 95e6ae85cf..03dabeea0a 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -78,7 +78,6 @@ if test "@host_os@" = darwin; then
BREW=no
fi
-PATH="${depends_prefix}/native/bin:${PATH}"
PKG_CONFIG="$(which pkg-config) --static"
# These two need to remain exported because pkg-config does not see them
@@ -115,6 +114,28 @@ if test -n "@NM@"; then
ac_cv_path_ac_pt_NM="${NM}"
fi
+if test -n "@STRIP@"; then
+ STRIP="@STRIP@"
+ ac_cv_path_ac_pt_STRIP="${STRIP}"
+fi
+
+if test "@host_os@" = darwin; then
+ if test -n "@OTOOL@"; then
+ OTOOL="@OTOOL@"
+ ac_cv_path_ac_pt_OTOOL="${OTOOL}"
+ fi
+
+ if test -n "@INSTALL_NAME_TOOL@"; then
+ INSTALL_NAME_TOOL="@INSTALL_NAME_TOOL@"
+ ac_cv_path_ac_pt_INSTALL_NAME_TOOL="${INSTALL_NAME_TOOL}"
+ fi
+
+ if test -n "@DSYMUTIL@"; then
+ DSYMUTIL="@DSYMUTIL@"
+ ac_cv_path_ac_pt_DSYMUTIL="${DSYMUTIL}"
+ fi
+fi
+
if test -n "@debug@"; then
enable_reduce_exports=no
fi
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index 6bf30b499a..bf9b7625f2 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -38,7 +38,7 @@ clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++")
clang_resource_dir=$(shell clang -print-resource-dir)
endif
-cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL
+cctools_TOOLS=AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL
# Make-only lowercase function
lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk
index 258619a9d0..ea60f025de 100644
--- a/depends/hosts/default.mk
+++ b/depends/hosts/default.mk
@@ -8,8 +8,6 @@ default_host_AR = $(host_toolchain)ar
default_host_RANLIB = $(host_toolchain)ranlib
default_host_STRIP = $(host_toolchain)strip
default_host_LIBTOOL = $(host_toolchain)libtool
-default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool
-default_host_OTOOL = $(host_toolchain)otool
default_host_NM = $(host_toolchain)nm
define add_host_tool_func
@@ -35,5 +33,5 @@ host_$1 = $$($(host_arch)_$(host_os)_$1)
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
endef
-$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool))))
+$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
$(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))