Skip to content

Commit 0f8c420

Browse files
committed
merge bitcoin#29890: remove some tools when cross-compiling for macOS
1 parent 936da1a commit 0f8c420

File tree

9 files changed

+9
-17
lines changed

9 files changed

+9
-17
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ $(OSX_DMG): deploydir
130130
$(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))
131131

132132
$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
133-
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
133+
OTOOL=$(OTOOL) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
134134

135135
deploydir: $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Dash-Qt
136136
endif !BUILD_DARWIN

configure.ac

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,9 @@ case $host in
770770
TARGET_OS=darwin
771771
if test x$cross_compiling != xyes; then
772772
BUILD_OS=darwin
773+
774+
AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"],, [[$LDFLAG_WERROR]])
775+
773776
AC_CHECK_PROG([BREW],brew, brew)
774777
if test x$BREW = xbrew; then
775778
dnl These Homebrew packages may be keg-only, meaning that they won't be found
@@ -833,7 +836,6 @@ case $host in
833836
;;
834837
*)
835838
AC_PATH_TOOL([DSYMUTIL], [dsymutil], dsymutil)
836-
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], install_name_tool)
837839
AC_PATH_TOOL([OTOOL], [otool], otool)
838840
AC_PATH_PROGS([XORRISOFS], [xorrisofs], xorrisofs)
839841

@@ -846,7 +848,6 @@ case $host in
846848
esac
847849
fi
848850

849-
AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"],, [[$LDFLAG_WERROR]])
850851
CPPFLAGS="$CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
851852
OBJCXXFLAGS="$CXXFLAGS"
852853
;;

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
@@ -227,7 +227,6 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
227227
-e 's|@NM@|$(host_NM)|' \
228228
-e 's|@STRIP@|$(host_STRIP)|' \
229229
-e 's|@OTOOL@|$(host_OTOOL)|' \
230-
-e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
231230
-e 's|@build_os@|$(build_os)|' \
232231
-e 's|@host_os@|$(host_os)|' \
233232
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \

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_SHA256SUM=shasum -a 256
109
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
1110

@@ -17,7 +16,6 @@ darwin_RANLIB:=$(shell xcrun -f ranlib)
1716
darwin_STRIP:=$(shell xcrun -f strip)
1817
darwin_OTOOL:=$(shell xcrun -f otool)
1918
darwin_NM:=$(shell xcrun -f nm)
20-
darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
2119
darwin_native_binutils=
2220
darwin_native_toolchain=
2321

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 TOUCH,$(eval $(call add_build_tool_func,$(var))))
15+
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL 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
@@ -125,11 +125,6 @@ if test "@host_os@" = darwin; then
125125
OTOOL="@OTOOL@"
126126
ac_cv_path_ac_pt_OTOOL="${OTOOL}"
127127
fi
128-
129-
if test -n "@INSTALL_NAME_TOOL@"; then
130-
INSTALL_NAME_TOOL="@INSTALL_NAME_TOOL@"
131-
ac_cv_path_ac_pt_INSTALL_NAME_TOOL="${INSTALL_NAME_TOOL}"
132-
fi
133128
fi
134129

135130
if test -n "@debug@"; then

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
42+
cctools_TOOLS=AR RANLIB STRIP NM OTOOL
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,$(eval $(call add_host_tool_func,$(tool))))
41+
$(foreach tool,CC CXX AR RANLIB STRIP NM OBJCOPY OTOOL,$(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)