summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-04-22 00:02:21 +0800
committerruki <[email protected]>2023-04-22 00:02:21 +0800
commita4a1414b6d81985e4e880c4960ca56016038bee6 (patch)
tree22a8e4e8ea11aca36bec5949e0d1d86224ee8e75
parent9596a927fc0c03a396a0d1016ddba7acf6de646a (diff)
fix configure #3660
-rwxr-xr-xconfigure14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure b/configure
index eb20469d1..fb4325748 100755
--- a/configure
+++ b/configure
@@ -1566,11 +1566,11 @@ _get_target_toolchain_flags_for_gcc() {
local toolkind="${2}"
local flags=""
if is_arch "i386"; then
- flags="-m32"
+ flags="${flags} -m32"
fi
_get_target_item "${name}" "kind"; local targetkind="${_ret}"
if test_eq "${targetkind}" "shared" && test_eq "${toolkind}" "sh"; then
- flags="-shared -fPIC"
+ flags="${flags} -shared -fPIC"
fi
_ret="${flags}"
}
@@ -1581,11 +1581,17 @@ _get_target_toolchain_flags_for_clang() {
local toolkind="${2}"
local flags="-Qunused-arguments"
if is_arch "i386"; then
- flags="-m32"
+ flags="${flags} -m32"
fi
_get_target_item "${name}" "kind"; local targetkind="${_ret}"
if test_eq "${targetkind}" "shared" && test_eq "${toolkind}" "sh"; then
- flags="-shared -fPIC"
+ flags="${flags} -shared -fPIC"
+ fi
+ if is_plat "macosx"; then
+ _os_iorunv "xcrun" "-sdk" "macosx" "--show-sdk-path"; local sdkdir="${_ret}"
+ if test_nz "${sdkdir}"; then
+ flags="${flags} -isysroot \"${sdkdir}\""
+ fi
fi
_ret="${flags}"
}