mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
1e94a2bcbc
Catalina SDK clang stopped automatically searching the SDK include paths when invoked without --sysroot: https://github.com/bitcoin/bitcoin/pull/16367#issuecomment-594600985 https://github.com/Homebrew/homebrew-core/issues/45061 This hasn't been a problem for current native depends packages because are passing their own --sysroot values, and hasn't been a problem for current host packages because they use `darwin_` commands instead of `build_darwin_` commands. But the current `build_darwin_CC` and `build_darwin_CXX` commands are still unnecessarily fragile, and incompatible with new native depends packages added in https://github.com/bitcoin/bitcoin/pull/18677. Cory Fields <cory-nospam-@coryfields.com> suggested in https://github.com/bitcoin/bitcoin/pull/16367#issuecomment-595393546 switching compiler from SDK clang to native clang (from $PATH) to avoid this problem. This is easy and makes a certain amount of sense for building native packages, as opposed to host packages. But fanquake <fanquake@gmail.com> pointed out in https://github.com/bitcoin/bitcoin/pull/18677#discussion_r409934309 that it would be inconsistent use switch to non-SDK compilers while still using other SDK tools like ranlib and install_name_tool. So simplest, minimal fix seems to be just adding the missing --sysroot option.
22 lines
1.2 KiB
Makefile
22 lines
1.2 KiB
Makefile
build_darwin_CC:=$(shell xcrun -f clang) --sysroot $(shell xcrun --show-sdk-path)
|
|
build_darwin_CXX:=$(shell xcrun -f clang++) --sysroot $(shell xcrun --show-sdk-path)
|
|
build_darwin_AR:=$(shell xcrun -f ar)
|
|
build_darwin_RANLIB:=$(shell xcrun -f ranlib)
|
|
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_SHA256SUM=shasum -a 256
|
|
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
|
|
|
|
#darwin host on darwin builder. overrides darwin host preferences.
|
|
darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(shell xcrun --show-sdk-path)
|
|
darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ --sysroot $(shell xcrun --show-sdk-path)
|
|
darwin_AR:=$(shell xcrun -f ar)
|
|
darwin_RANLIB:=$(shell xcrun -f ranlib)
|
|
darwin_STRIP:=$(shell xcrun -f strip)
|
|
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_native_toolchain=
|