fix build error 3
This commit is contained in:
@@ -31,10 +31,18 @@ flags_p2pool="$flags_size $flags_datetime"
|
|||||||
clang_bin="$(command -v aarch64-apple-darwin25-clang || true)"
|
clang_bin="$(command -v aarch64-apple-darwin25-clang || true)"
|
||||||
clangxx_bin="$(command -v aarch64-apple-darwin25-clang++ || true)"
|
clangxx_bin="$(command -v aarch64-apple-darwin25-clang++ || true)"
|
||||||
clangas_bin="$(command -v aarch64-apple-darwin25-as || true)"
|
clangas_bin="$(command -v aarch64-apple-darwin25-as || true)"
|
||||||
|
install_name_tool_bin="$(command -v aarch64-apple-darwin25-install_name_tool || true)"
|
||||||
if [ -z "$clang_bin" ] || [ -z "$clangxx_bin" ] || [ -z "$clangas_bin" ]; then
|
if [ -z "$clang_bin" ] || [ -z "$clangxx_bin" ] || [ -z "$clangas_bin" ]; then
|
||||||
echo "macOS cross toolchain binaries not found in PATH" >&2
|
echo "macOS cross toolchain binaries not found in PATH" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ -z "$install_name_tool_bin" ]; then
|
||||||
|
install_name_tool_bin="$(dirname "$clang_bin")/aarch64-apple-darwin25-install_name_tool"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$install_name_tool_bin" ]; then
|
||||||
|
echo "macOS install_name_tool not found (looked for aarch64-apple-darwin25-install_name_tool)" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
find_macos_sdk() {
|
find_macos_sdk() {
|
||||||
if [ -n "${SDKROOT:-}" ] && [ -d "${SDKROOT:-}" ]; then
|
if [ -n "${SDKROOT:-}" ] && [ -d "${SDKROOT:-}" ]; then
|
||||||
@@ -64,6 +72,7 @@ fi
|
|||||||
|
|
||||||
export SDKROOT="$sdk_sysroot"
|
export SDKROOT="$sdk_sysroot"
|
||||||
cmake_osx_args="-DCMAKE_OSX_SYSROOT=$sdk_sysroot -DCMAKE_SYSROOT=$sdk_sysroot -DCMAKE_SYSTEM_FRAMEWORK_PATH=$sdk_sysroot/System/Library/Frameworks"
|
cmake_osx_args="-DCMAKE_OSX_SYSROOT=$sdk_sysroot -DCMAKE_SYSROOT=$sdk_sysroot -DCMAKE_SYSTEM_FRAMEWORK_PATH=$sdk_sysroot/System/Library/Frameworks"
|
||||||
|
cmake_osx_args="$cmake_osx_args -DCMAKE_INSTALL_NAME_TOOL=$install_name_tool_bin"
|
||||||
|
|
||||||
wrap_compiler() {
|
wrap_compiler() {
|
||||||
real_bin="$1"
|
real_bin="$1"
|
||||||
|
|||||||
@@ -31,10 +31,18 @@ flags_p2pool="$flags_size $flags_datetime"
|
|||||||
clang_bin="$(command -v x86_64-apple-darwin25-clang || true)"
|
clang_bin="$(command -v x86_64-apple-darwin25-clang || true)"
|
||||||
clangxx_bin="$(command -v x86_64-apple-darwin25-clang++ || true)"
|
clangxx_bin="$(command -v x86_64-apple-darwin25-clang++ || true)"
|
||||||
clangas_bin="$(command -v x86_64-apple-darwin25-as || true)"
|
clangas_bin="$(command -v x86_64-apple-darwin25-as || true)"
|
||||||
|
install_name_tool_bin="$(command -v x86_64-apple-darwin25-install_name_tool || true)"
|
||||||
if [ -z "$clang_bin" ] || [ -z "$clangxx_bin" ] || [ -z "$clangas_bin" ]; then
|
if [ -z "$clang_bin" ] || [ -z "$clangxx_bin" ] || [ -z "$clangas_bin" ]; then
|
||||||
echo "macOS cross toolchain binaries not found in PATH" >&2
|
echo "macOS cross toolchain binaries not found in PATH" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ -z "$install_name_tool_bin" ]; then
|
||||||
|
install_name_tool_bin="$(dirname "$clang_bin")/x86_64-apple-darwin25-install_name_tool"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$install_name_tool_bin" ]; then
|
||||||
|
echo "macOS install_name_tool not found (looked for x86_64-apple-darwin25-install_name_tool)" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
find_macos_sdk() {
|
find_macos_sdk() {
|
||||||
if [ -n "${SDKROOT:-}" ] && [ -d "${SDKROOT:-}" ]; then
|
if [ -n "${SDKROOT:-}" ] && [ -d "${SDKROOT:-}" ]; then
|
||||||
@@ -64,6 +72,7 @@ fi
|
|||||||
|
|
||||||
export SDKROOT="$sdk_sysroot"
|
export SDKROOT="$sdk_sysroot"
|
||||||
cmake_osx_args="-DCMAKE_OSX_SYSROOT=$sdk_sysroot -DCMAKE_SYSROOT=$sdk_sysroot -DCMAKE_SYSTEM_FRAMEWORK_PATH=$sdk_sysroot/System/Library/Frameworks"
|
cmake_osx_args="-DCMAKE_OSX_SYSROOT=$sdk_sysroot -DCMAKE_SYSROOT=$sdk_sysroot -DCMAKE_SYSTEM_FRAMEWORK_PATH=$sdk_sysroot/System/Library/Frameworks"
|
||||||
|
cmake_osx_args="$cmake_osx_args -DCMAKE_INSTALL_NAME_TOOL=$install_name_tool_bin"
|
||||||
|
|
||||||
wrap_compiler() {
|
wrap_compiler() {
|
||||||
real_bin="$1"
|
real_bin="$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user