Skip to content

Commit 2625984

Browse files
d7cb92a merge bitcoin#28783: remove `-bind_at_load` usage (Kittywhiskers Van Gogh) 019c9dd partial bitcoin#25612: default to using GCC tool wrappers for LTO (with GCC) (Kittywhiskers Van Gogh) 9e0b935 partial bitcoin#24866: No longer need to hack the `PATH` variable in `config.site` (Kittywhiskers Van Gogh) 5dbc83b merge bitcoin#28630: update `LD64_VERSION` to 711 (Kittywhiskers Van Gogh) b265352 merge bitcoin#28422: cctools 986, ld64 711 & libtapi 1300.0.6.5 (Kittywhiskers Van Gogh) fe94154 merge bitcoin#28337: use Clang 15 for macOS cross-compilation (Kittywhiskers Van Gogh) ba28141 ci: add missing `xorriso` `PACKAGES` entry in macOS environment (Kittywhiskers Van Gogh) 62b0213 merge bitcoin#27999: add macOS test for fixup_chains usage (Kittywhiskers Van Gogh) be17509 merge bitcoin#27676: Bump minimum required runtime version and prepare for building with upstream LLVM (Kittywhiskers Van Gogh) 9f5d4b3 merge bitcoin#27798: modernize clang flags for Darwin (Kittywhiskers Van Gogh) 54c538d merge bitcoin#26578: install binutils, not binutils-gold in depends (Kittywhiskers Van Gogh) d0aae2b merge bitcoin#26059: revert "Build depends/qt with our platform definition" (Kittywhiskers Van Gogh) 9d1cd62 merge bitcoin#25917: libnatpmp 07004b97cf691774efebe70404cf22201e4d330d (Kittywhiskers Van Gogh) fff0f6b merge bitcoin#25838: Use `mkspecs/bitcoin-linux-g++` for all Linux hosts (Kittywhiskers Van Gogh) 8d51bcc merge bitcoin#22380: add and use C_STANDARD and CXX_STANDARD in depends (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * Dependent on #6383 * Dependency for #6385 * [bitcoin#24866](bitcoin#24866) is partial because f3af4f7 alters the way `dsymutil`'s location is reported, which is relevant due to the build target `osx_debug` ([source](https://github.com/dashpay/dash/blob/3aa51d651597ecbdc3a0f16eb8bad39b5d4c1612/src/Makefile.am#L1025-L1026)) using `dsymutil` to generate flat dSYM bundles to ensure that stacktraces work as expected (introduced in [dash#3006](1807c47#diff-4cb884d03ebb901069e4ee5de5d02538c40dd9b39919c615d8eaa9d364bbbd77R668-R669)) As-is, with the changes, aberrant behaviour is noticeable when running `configure` (see below), where `depends` defines `DSYMUTIL` as being included in the target directory of the `native_clang` package... despite Guix builds using `FORCE_USE_SYSTEM_CLANG` ([source](https://github.com/dashpay/dash/blame/3aa51d651597ecbdc3a0f16eb8bad39b5d4c1612/contrib/guix/libexec/build.sh#L206)), meaning, the `native_clang` is never staged in `depends` because the build environment natively has it. Attempting to override it in `build.sh` yielded no results. <details> <summary>Run:</summary> ``` [...] checking whether dsymutil needs -flat... ./configure: line 36201: /dash/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-dsymutil: No such file or directory no checking that generated files are newer than configure... done [...] ``` </details> Which eventually results in the build failing <details> <summary>Failure:</summary> ``` make: Entering directory '/distsrc-base/distsrc-22.0.0-beta.1-79-gb284e4c7cd48-x86_64-apple-darwin/src' for i in dashd dash-cli dash-tx dash-wallet test/test_dash qt/dash-qt ; do mkdir -p $i.dSYM/Contents/Resources/DWARF && /dash/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-dsymutil -o $i.dSYM/Contents/Resources/DWARF/$(basename $i) $i &> /dev/null ; done make: *** [Makefile:22468: osx_debug] Error 127 make: Leaving directory '/distsrc-base/distsrc-22.0.0-beta.1-79-gb284e4c7cd48-x86_64-apple-darwin/src' ``` </details> To avoid breakage, the commit overriding `DSYMUTIL` and subsequent changes building on it (portions of [bitcoin#25612](bitcoin#25612)) have been skipped. ## Breaking Changes * The minimum runtime version needed to run Dash Qt is now macOS 11 (Big Sur) ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK d7cb92a Tree-SHA512: 28c9ea13adc80a00b501afca286bd0b97e14a272bb50f578df7ab1af6ee8139f563bc5d670f0bfe3632bfab769c8228a76b5bcc51cfb727a54e31ac0f9af7a97
2 parents c44ae90 + d7cb92a commit 2625984

35 files changed

+176
-133
lines changed

.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ task:
154154
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"
155155

156156
task:
157-
name: 'macOS 10.12 [gui, no tests] [jammy]'
157+
name: 'macOS 11.0 [gui, no tests] [jammy]'
158158
<< : *GLOBAL_TASK_TEMPLATE
159159
container:
160160
image: ubuntu:jammy

Makefile.am

+1-1
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-
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
133+
INSTALL_NAME_TOOL=$(INSTALL_NAME_TOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(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

ci/test/00_setup_env_mac.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_macos_cross
1010
export HOST=x86_64-apple-darwin
11-
export PACKAGES="cmake libz-dev libtinfo5 python3-setuptools"
11+
export PACKAGES="cmake libz-dev python3-setuptools xorriso"
1212
export XCODE_VERSION=12.2
1313
export XCODE_BUILD_ID=12B45b
1414
export RUN_UNIT_TESTS=false
1515
export RUN_FUNCTIONAL_TESTS=false
1616
export GOAL="all deploy"
17-
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --disable-miner --with-boost-process"
17+
18+
# False-positive warning is fixed with clang 17, remove this when that version
19+
# can be used.
20+
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --disable-miner --with-boost-process LDFLAGS=-Wno-error=unused-command-line-argument"

configure.ac

+13-2
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ case $host in
843843
;;
844844
*)
845845
AC_PATH_TOOL([DSYMUTIL], [dsymutil], dsymutil)
846-
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
846+
AC_PATH_TOOL([INSTALL_NAME_TOOL], [install_name_tool], install_name_tool)
847847
AC_PATH_TOOL([OTOOL], [otool], otool)
848848
AC_PATH_PROGS([XORRISOFS], [xorrisofs], xorrisofs)
849849

@@ -1047,7 +1047,7 @@ dnl "ad_strip" as the symbol for the entry point.
10471047
if test x$TARGET_OS = xdarwin; then
10481048
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"],, [[$LDFLAG_WERROR]])
10491049
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"],, [[$LDFLAG_WERROR]])
1050-
AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"],, [[$LDFLAG_WERROR]])
1050+
AX_CHECK_LINK_FLAG([[-Wl,-fixup_chains]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [[$LDFLAG_WERROR]])
10511051
fi
10521052

10531053
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
@@ -1955,6 +1955,17 @@ case ${OS} in
19551955
;;
19561956
esac
19571957

1958+
dnl An old hack similar to a98356fee to remove hard-coded
1959+
dnl bind_at_load flag from libtool
1960+
case $host in
1961+
*darwin*)
1962+
AC_MSG_RESULT([Removing -Wl,bind_at_load from libtool.])
1963+
sed < libtool > libtool-2 '/bind_at_load/d'
1964+
mv libtool-2 libtool
1965+
chmod 755 libtool
1966+
;;
1967+
esac
1968+
19581969
echo
19591970
echo "Options used to compile and link:"
19601971
echo " boost process = $with_boost_process"

contrib/devtools/security-check.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,11 @@ def check_MACHO_NOUNDEFS(binary) -> bool:
158158
'''
159159
return binary.header.has(lief.MachO.HEADER_FLAGS.NOUNDEFS)
160160

161-
def check_MACHO_LAZY_BINDINGS(binary) -> bool:
161+
def check_MACHO_FIXUP_CHAINS(binary) -> bool:
162162
'''
163-
Check for no lazy bindings.
164-
We don't use or check for MH_BINDATLOAD. See #18295.
163+
Check for use of chained fixups.
165164
'''
166-
return binary.dyld_info.lazy_bind == (0,0)
165+
return binary.has_dyld_chained_fixups
167166

168167
def check_MACHO_Canary(binary) -> bool:
169168
'''
@@ -214,8 +213,8 @@ def check_MACHO_control_flow(binary) -> bool:
214213

215214
BASE_MACHO = [
216215
('NOUNDEFS', check_MACHO_NOUNDEFS),
217-
('LAZY_BINDINGS', check_MACHO_LAZY_BINDINGS),
218216
('Canary', check_MACHO_Canary),
217+
('FIXUP_CHAINS', check_MACHO_FIXUP_CHAINS),
219218
]
220219

221220
CHECKS = {

contrib/devtools/symbol-check.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def check_MACHO_libraries(binary) -> bool:
242242
return ok
243243

244244
def check_MACHO_min_os(binary) -> bool:
245-
if binary.build_version.minos == [10,15,0]:
245+
if binary.build_version.minos == [11,0,0]:
246246
return True
247247
return False
248248

@@ -251,6 +251,11 @@ def check_MACHO_sdk(binary) -> bool:
251251
return True
252252
return False
253253

254+
def check_MACHO_ld64(binary) -> bool:
255+
if binary.build_version.tools[0].version == [711, 0, 0]:
256+
return True
257+
return False
258+
254259
def check_PE_libraries(binary) -> bool:
255260
ok: bool = True
256261
for dylib in binary.libraries:
@@ -290,6 +295,7 @@ def check_ELF_ABI(binary) -> bool:
290295
('DYNAMIC_LIBRARIES', check_MACHO_libraries),
291296
('MIN_OS', check_MACHO_min_os),
292297
('SDK', check_MACHO_sdk),
298+
('LD64', check_MACHO_ld64),
293299
],
294300
lief.EXE_FORMATS.PE: [
295301
('DYNAMIC_LIBRARIES', check_PE_libraries),

contrib/devtools/test-security-check.py

+20-18
Original file line numberDiff line numberDiff line change
@@ -119,29 +119,31 @@ def test_MACHO(self):
119119
arch = get_arch(cc, source, executable)
120120

121121
if arch == lief.ARCHITECTURES.X86:
122-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']),
123-
(1, executable+': failed NOUNDEFS LAZY_BINDINGS Canary PIE NX CONTROL_FLOW'))
124-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all']),
125-
(1, executable+': failed NOUNDEFS LAZY_BINDINGS PIE NX CONTROL_FLOW'))
126-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all']),
127-
(1, executable+': failed NOUNDEFS LAZY_BINDINGS PIE CONTROL_FLOW'))
128-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all']),
129-
(1, executable+': failed LAZY_BINDINGS PIE CONTROL_FLOW'))
130-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all']),
122+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector', '-Wl,-no_fixup_chains']),
123+
(1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS PIE NX CONTROL_FLOW'))
124+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector', '-Wl,-fixup_chains']),
125+
(1, executable+': failed NOUNDEFS Canary PIE NX CONTROL_FLOW'))
126+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all', '-Wl,-fixup_chains']),
127+
(1, executable+': failed NOUNDEFS PIE NX CONTROL_FLOW'))
128+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']),
129+
(1, executable+': failed NOUNDEFS PIE CONTROL_FLOW'))
130+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']),
131131
(1, executable+': failed PIE CONTROL_FLOW'))
132-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full']),
132+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']),
133+
(1, executable+': failed PIE CONTROL_FLOW'))
134+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
133135
(1, executable+': failed PIE'))
134-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full']),
136+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
135137
(0, ''))
136138
else:
137139
# arm64 darwin doesn't support non-PIE binaries, control flow or executable stacks
138-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector']),
139-
(1, executable+': failed NOUNDEFS LAZY_BINDINGS Canary'))
140-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all']),
141-
(1, executable+': failed NOUNDEFS LAZY_BINDINGS'))
142-
self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all']),
143-
(1, executable+': failed LAZY_BINDINGS'))
144-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-bind_at_load','-fstack-protector-all']),
140+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-no_fixup_chains']),
141+
(1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS'))
142+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-fixup_chains']),
143+
(1, executable+': failed NOUNDEFS Canary'))
144+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']),
145+
(1, executable+': failed NOUNDEFS'))
146+
self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all', '-Wl,-fixup_chains']),
145147
(0, ''))
146148

147149

contrib/devtools/test-symbol-check.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def test_MACHO(self):
121121
}
122122
''')
123123

124-
self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,-platform_version','-Wl,macos', '-Wl,10.15', '-Wl,11.4']),
124+
self.assertEqual(call_symbol_check(cc, source, executable, ['-Wl,-platform_version','-Wl,macos', '-Wl,11.0', '-Wl,11.4']),
125125
(1, f'{executable}: failed SDK'))
126126

127127
def test_PE(self):

contrib/guix/libexec/build.sh

-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
202202
x86_64_linux_RANLIB=x86_64-linux-gnu-gcc-ranlib \
203203
x86_64_linux_NM=x86_64-linux-gnu-gcc-nm \
204204
x86_64_linux_STRIP=x86_64-linux-gnu-strip \
205-
qt_config_opts_x86_64_linux='-platform linux-g++ -xplatform bitcoin-linux-g++' \
206205
FORCE_USE_SYSTEM_CLANG=1
207206

208207

contrib/guix/manifest.scm

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ inspecting signatures in Mach-O binaries.")
609609
(list ;; Native GCC 11 toolchain
610610
gcc-toolchain-11
611611
binutils
612-
clang-toolchain-10
612+
clang-toolchain-15
613613
python-signapple
614614
xorriso))
615615
(else '())))))

contrib/macdeploy/macdeployqtplus

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]:
211211
return libraries
212212

213213
def runInstallNameTool(action: str, *args):
214-
installnametoolbin=os.getenv("INSTALLNAMETOOL", "install_name_tool")
214+
installnametoolbin=os.getenv("INSTALL_NAME_TOOL", "install_name_tool")
215215
run([installnametoolbin, "-"+action] + list(args), check=True)
216216

217217
def changeInstallName(oldName: str, newName: str, binaryPath: str, verbose: int):

depends/Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ MULTIPROCESS ?=
4545
LTO ?=
4646
FALLBACK_DOWNLOAD_PATH ?= http://dash-depends-sources.s3-website-us-west-2.amazonaws.com
4747

48+
C_STANDARD ?= c11
49+
CXX_STANDARD ?= c++17
50+
4851
BUILD = $(shell ./config.guess)
4952
HOST ?= $(BUILD)
5053
PATCHES_PATH = $(BASEDIR)/patches
@@ -223,6 +226,8 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
223226
-e 's|@RANLIB@|$(host_RANLIB)|' \
224227
-e 's|@NM@|$(host_NM)|' \
225228
-e 's|@STRIP@|$(host_STRIP)|' \
229+
-e 's|@OTOOL@|$(host_OTOOL)|' \
230+
-e 's|@INSTALL_NAME_TOOL@|$(host_INSTALL_NAME_TOOL)|' \
226231
-e 's|@build_os@|$(build_os)|' \
227232
-e 's|@host_os@|$(host_os)|' \
228233
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \

depends/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The paths are automatically configured and no other options are needed unless ta
4747

4848
#### For macOS cross compilation
4949

50-
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools libtinfo5 xorriso
50+
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools xorriso
5151

5252
Note: You must obtain the macOS SDK before proceeding with a cross-compile.
5353
Under the depends directory, create a subdirectory named `SDKs`.
@@ -62,7 +62,7 @@ For more information, see [SDK Extraction](../contrib/macdeploy/README.md#sdk-ex
6262

6363
Common linux dependencies:
6464

65-
sudo apt-get install make automake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch bison
65+
sudo apt-get install make automake curl g++-multilib libtool binutils bsdmainutils pkg-config python3 patch bison
6666

6767
For linux ARM cross compilation:
6868

@@ -103,6 +103,8 @@ The following can be set when running make: `make FOO=bar`
103103
- `BASE_CACHE`: Built packages will be placed here
104104
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
105105
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
106+
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
107+
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++17`.
106108
- `NO_QT`: Don't download/build/cache Qt and its dependencies
107109
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
108110
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ

depends/builders/default.mk

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ default_build_TAR = tar
55
default_build_RANLIB = ranlib
66
default_build_STRIP = strip
77
default_build_NM = nm
8-
default_build_OTOOL = otool
9-
default_build_INSTALL_NAME_TOOL = install_name_tool
108

119
define add_build_tool_func
1210
build_$(build_os)_$1 ?= $$(default_build_$1)

depends/config.site.in

+17
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,23 @@ if test -n "@NM@"; then
119119
ac_cv_path_ac_pt_NM="${NM}"
120120
fi
121121

122+
if test -n "@STRIP@"; then
123+
STRIP="@STRIP@"
124+
ac_cv_path_ac_pt_STRIP="${STRIP}"
125+
fi
126+
127+
if test "@host_os@" = darwin; then
128+
if test -n "@OTOOL@"; then
129+
OTOOL="@OTOOL@"
130+
ac_cv_path_ac_pt_OTOOL="${OTOOL}"
131+
fi
132+
133+
if test -n "@INSTALL_NAME_TOOL@"; then
134+
INSTALL_NAME_TOOL="@INSTALL_NAME_TOOL@"
135+
ac_cv_path_ac_pt_INSTALL_NAME_TOOL="${INSTALL_NAME_TOOL}"
136+
fi
137+
fi
138+
122139
if test -n "@debug@"; then
123140
enable_reduce_exports=no
124141
fi

depends/hosts/android.mk

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++
66
android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang
77
endif
88

9+
android_CFLAGS=-std=$(C_STANDARD)
10+
android_CXXFLAGS=-std=$(CXX_STANDARD)
11+
912
ifneq ($(LTO),)
1013
android_CFLAGS += -flto
1114
android_LDFLAGS += -flto

0 commit comments

Comments
 (0)