Skip to content

Commit 3bee514

Browse files
committed
build: don't use install_name_tool for macOS deploy when cross-compiling
This is only needed when compiling on macOS. This means we can also better scope the usage of `-headerpad_max_install_names`.
1 parent 78b6b5c commit 3bee514

File tree

9 files changed

+6
-16
lines changed

9 files changed

+6
-16
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ $(OSX_ZIP): deploydir
126126
cd $(APP_DIST_DIR) && find . | sort | $(ZIP) -X@ $@
127127

128128
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
129-
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
129+
OTOOL=$(OTOOL) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
130130

131131
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
132132
endif !BUILD_DARWIN

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,6 @@ case $host in
759759
;;
760760
*)
761761
AC_PATH_TOOL([DSYMUTIL], [dsymutil], [dsymutil])
762-
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], [install_name_tool])
763762
AC_PATH_TOOL([OTOOL], [otool], [otool])
764763
AC_PATH_PROG([ZIP], [zip], [zip])
765764

contrib/macdeploy/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ building for macOS.
6666

6767
Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the
6868
FSF's `binutils`. In addition to extra linker options for frameworks and sysroots, several
69-
other tools are needed as well such as `install_name_tool`, `lipo`, and `nmedit`. These
70-
do not build under Linux, so they have been patched to do so. The work here was used as
71-
a starting point: [mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4).
69+
other tools are needed as well. These do not build under Linux, so they have been patched to
70+
do so. The work here was used as a starting point: [mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4).
7271

7372
In order to build a working toolchain, the following source packages are needed from
7473
Apple: `cctools`, `dyld`, and `ld64`.

depends/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
234234
-e 's|@NM@|$(host_NM)|' \
235235
-e 's|@STRIP@|$(host_STRIP)|' \
236236
-e 's|@OTOOL@|$(host_OTOOL)|' \
237-
-e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
238237
-e 's|@DSYMUTIL@|$(host_DSYMUTIL)|' \
239238
-e 's|@build_os@|$(build_os)|' \
240239
-e 's|@host_os@|$(host_os)|' \

depends/builders/darwin.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ build_darwin_RANLIB:=$(shell xcrun -f ranlib)
55
build_darwin_STRIP:=$(shell xcrun -f strip)
66
build_darwin_OTOOL:=$(shell xcrun -f otool)
77
build_darwin_NM:=$(shell xcrun -f nm)
8-
build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
98
build_darwin_DSYMUTIL:=$(shell xcrun -f dsymutil)
109
build_darwin_SHA256SUM=shasum -a 256
1110
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
@@ -18,7 +17,6 @@ darwin_RANLIB:=$(shell xcrun -f ranlib)
1817
darwin_STRIP:=$(shell xcrun -f strip)
1918
darwin_OTOOL:=$(shell xcrun -f otool)
2019
darwin_NM:=$(shell xcrun -f nm)
21-
darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
2220
darwin_DSYMUTIL:=$(shell xcrun -f dsymutil)
2321
darwin_native_binutils=
2422
darwin_native_toolchain=

depends/builders/default.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ build_$(build_os)_$1 ?= $$(default_build_$1)
1212
build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)
1313
build_$1=$$(build_$(build_arch)_$(build_os)_$1)
1414
endef
15-
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL DSYMUTIL TOUCH,$(eval $(call add_build_tool_func,$(var))))
15+
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL DSYMUTIL TOUCH,$(eval $(call add_build_tool_func,$(var))))
1616
define add_build_flags_func
1717
build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1)
1818
build_$1=$$(build_$(build_arch)_$(build_os)_$1)

depends/config.site.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ if test "@host_os@" = darwin; then
123123
ac_cv_path_OTOOL="${OTOOL}"
124124
fi
125125

126-
if test -n "@INSTALL_NAME_TOOL@"; then
127-
INSTALL_NAME_TOOL="@INSTALL_NAME_TOOL@"
128-
ac_cv_path_INSTALL_NAME_TOOL="${INSTALL_NAME_TOOL}"
129-
fi
130-
131126
if test -n "@DSYMUTIL@"; then
132127
DSYMUTIL="@DSYMUTIL@"
133128
ac_cv_path_DSYMUTIL="${DSYMUTIL}"

depends/hosts/darwin.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ llvm_config_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-config")
3939
llvm_lib_dir=$(shell $(llvm_config_prog) --libdir)
4040
endif
4141

42-
cctools_TOOLS=AR RANLIB STRIP NM OTOOL INSTALL_NAME_TOOL DSYMUTIL
42+
cctools_TOOLS=AR RANLIB STRIP NM OTOOL DSYMUTIL
4343

4444
# Make-only lowercase function
4545
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))))))))))))))))))))))))))

depends/hosts/default.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ host_$1 = $$($(host_arch)_$(host_os)_$1)
3838
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
3939
endef
4040

41-
$(foreach tool,CC CXX AR RANLIB STRIP NM OBJCOPY OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
41+
$(foreach tool,CC CXX AR RANLIB STRIP NM OBJCOPY OTOOL DSYMUTIL,$(eval $(call add_host_tool_func,$(tool))))
4242
$(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))

0 commit comments

Comments
 (0)