2023-07-06 18:13:12 -04:00
|
|
|
OSX_MIN_VERSION=10.13
|
2023-07-02 15:00:24 -04:00
|
|
|
OSX_SDK_VERSION=11.0
|
|
|
|
XCODE_VERSION=12.2
|
|
|
|
XCODE_BUILD_ID=12B45b
|
2022-05-03 18:03:28 -04:00
|
|
|
LD64_VERSION=609
|
2023-07-02 15:00:24 -04:00
|
|
|
|
|
|
|
OSX_SDK=$(host_prefix)/native/SDK
|
|
|
|
|
|
|
|
darwin_native_toolchain=darwin_sdk native_cctools
|
|
|
|
|
|
|
|
clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang")
|
|
|
|
clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++")
|
|
|
|
|
|
|
|
# Flag explanations:
|
|
|
|
#
|
|
|
|
# -mlinker-version
|
|
|
|
#
|
|
|
|
# Ensures that modern linker features are enabled. See here for more
|
|
|
|
# details: https://github.com/bitcoin/bitcoin/pull/19407.
|
|
|
|
#
|
|
|
|
# -B$(build_prefix)/bin
|
|
|
|
#
|
|
|
|
# Explicitly point to our binaries (e.g. cctools) so that they are
|
|
|
|
# ensured to be found and preferred over other possibilities.
|
|
|
|
#
|
|
|
|
# -isysroot$(OSX_SDK) -nostdlibinc
|
|
|
|
#
|
|
|
|
# Disable default include paths built into the compiler as well as
|
|
|
|
# those normally included for libc and libc++. The only path that
|
|
|
|
# remains implicitly is the clang resource dir.
|
|
|
|
#
|
|
|
|
# -iwithsysroot / -iframeworkwithsysroot
|
|
|
|
#
|
|
|
|
# Adds the desired paths from the SDK
|
|
|
|
#
|
|
|
|
|
|
|
|
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
|
|
|
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
|
|
|
-u LIBRARY_PATH \
|
|
|
|
$(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
|
|
|
|
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
|
|
|
|
-isysroot$(OSX_SDK) \
|
|
|
|
-isysroot$(OSX_SDK) -nostdlibinc \
|
|
|
|
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
|
|
|
|
|
|
|
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
|
|
|
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
|
|
|
-u LIBRARY_PATH \
|
|
|
|
$(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
|
|
|
|
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
|
|
|
|
-isysroot$(OSX_SDK) -nostdlibinc \
|
|
|
|
-iwithsysroot/usr/include/c++/v1 \
|
|
|
|
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
2018-03-18 18:01:56 -04:00
|
|
|
|
|
|
|
darwin_CFLAGS=-pipe
|
|
|
|
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
2019-11-13 08:50:17 -05:00
|
|
|
darwin_ARFLAGS=cr
|
2018-03-18 18:01:56 -04:00
|
|
|
|
2023-07-02 15:00:24 -04:00
|
|
|
darwin_release_CFLAGS=-O2
|
2018-03-18 18:01:56 -04:00
|
|
|
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
|
|
|
|
|
|
|
|
darwin_debug_CFLAGS=-O1
|
|
|
|
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
|
|
|
|
|
2023-09-26 10:37:29 -04:00
|
|
|
darwin_cmake_system=Darwin
|