summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-12-20 00:14:03 +0800
committerruki <[email protected]>2022-12-20 00:14:03 +0800
commit0c61da1f845dbaefb8f3b034a51198190ab69470 (patch)
treec356a2fd57f50dfb3703faa84860f1979a23b0fa
parent966f52f81a31277e2ce8258ef73fdd9c7df466bd (diff)
add pthread links
-rwxr-xr-xconfigure32
-rwxr-xr-xcore/src/demo/xmake.sh7
2 files changed, 23 insertions, 16 deletions
diff --git a/configure b/configure
index b6a8c0518..a5618a04a 100755
--- a/configure
+++ b/configure
@@ -2804,7 +2804,7 @@ _toolchain_linkcmd() {
# try make
_toolchain_try_make() {
- local program=${1}
+ local program="${1}"
if _os_runv "${program}" "--version"; then
return 0
fi
@@ -2813,7 +2813,7 @@ _toolchain_try_make() {
# try ninja
_toolchain_try_ninja() {
- local program=${1}
+ local program="${1}"
if _os_runv "${program}" "--version"; then
return 0
fi
@@ -2828,8 +2828,8 @@ _toolchain_try_gcc() {
return 1
fi
- local kind=${1}
- local program=${2}
+ local kind="${1}"
+ local program="${2}"
if _os_runv "${program}" "--version"; then
_toolchain_try_gcc_result="ok"
return 0
@@ -2846,8 +2846,8 @@ _toolchain_try_gxx() {
return 1
fi
- local kind=${1}
- local program=${2}
+ local kind="${1}"
+ local program="${2}"
if _os_runv "${program}" "--version"; then
_toolchain_try_gxx_result="ok"
return 0
@@ -2864,8 +2864,8 @@ _toolchain_try_clang() {
return 1
fi
- local kind=${1}
- local program=${2}
+ local kind="${1}"
+ local program="${2}"
if _os_runv "${program}" "--version"; then
_toolchain_try_clang_result="ok"
return 0
@@ -2882,8 +2882,8 @@ _toolchain_try_clangxx() {
return 1
fi
- local kind=${1}
- local program=${2}
+ local kind="${1}"
+ local program="${2}"
if _os_runv "${program}" "--version"; then
_toolchain_try_clangxx_result="ok"
return 0
@@ -2892,10 +2892,10 @@ _toolchain_try_clangxx() {
return 1
}
-# TODO try ar
+# try ar
_toolchain_try_ar() {
- local kind=${1}
- local program=${2}
+ local kind="${1}"
+ local program="${2}"
# generate the source file
_os_tmpfile
@@ -2921,9 +2921,9 @@ _toolchain_try_ar() {
# try program
_toolchain_try_program() {
- local toolchain=${1}
- local kind=${2}
- local program=${3}
+ local toolchain="${1}"
+ local kind="${2}"
+ local program="${3}"
local ok=false
path_toolname "${program}"; local toolname="${_ret}"
case "${toolname}" in
diff --git a/core/src/demo/xmake.sh b/core/src/demo/xmake.sh
index 8f4bf3d95..d8845d180 100755
--- a/core/src/demo/xmake.sh
+++ b/core/src/demo/xmake.sh
@@ -25,3 +25,10 @@ target "demo"
# add install files
add_installfiles "${projectdir}/(xmake/**.lua)" "share"
add_installfiles "${projectdir}/scripts/xrepo.sh" "bin" "xrepo"
+
+ # add syslinks
+ if is_plat "mingw" "msys" "cygwin"; then
+ add_syslinks "ws2_32" "pthread" "m"
+ else
+ add_syslinks "pthread" "dl" "m" "c"
+ fi