diff options
| author | ruki <[email protected]> | 2023-10-25 17:43:32 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-25 17:43:32 -0500 |
| commit | 30b0405058c7a90ec60f36179993c74b59717994 (patch) | |
| tree | 7ec85cb60eea4f0e0b05576b0c802fa4dd01f7fb | |
| parent | ecae2ad7455094fc72ae9abfe8e8a226130fe570 (diff) | |
| parent | 3e11b0aa3c05db18035388bf740597d27664e847 (diff) | |
Merge pull request #4317 from xmake-io/armel
add atomic link for linux/arm
| -rwxr-xr-x | configure | 8 | ||||
| -rwxr-xr-x | core/xmake.sh | 4 |
2 files changed, 10 insertions, 2 deletions
@@ -641,10 +641,12 @@ is_host() { os_arch=`uname -m | tr '[A-Z]' '[a-z]'` if test_eq "${os_arch}" "i686"; then os_arch="i386" -elif test_eq "${os_arch}" "aarch64"; then +elif test_eq "${os_arch}" "aarch64" || test_eq "${os_arch}" "arm64"; then os_arch="arm64" elif string_contains "${os_arch}" "armv7"; then os_arch="armv7" +elif string_contains "${os_arch}" "arm"; then + os_arch="arm" fi # set the default target platform @@ -668,10 +670,12 @@ elif test_nz "${EMSDK}"; then fi if test_eq "${_target_arch_default}" "i686"; then _target_arch_default="i386" -elif test_eq "${_target_arch_default}" "aarch64"; then +elif test_eq "${_target_arch_default}" "aarch64" || test_eq "${_target_arch_default}" "arm64"; then _target_arch_default="arm64" elif string_contains "${_target_arch_default}" "armv7"; then _target_arch_default="armv7" +elif string_contains "${_target_arch_default}" "arm"; then + _target_arch_default="arm" fi # set the default target mode diff --git a/core/xmake.sh b/core/xmake.sh index 9e5b07b7a..e17dee160 100755 --- a/core/xmake.sh +++ b/core/xmake.sh @@ -196,6 +196,10 @@ option_find_tbox() { fi add_cflags "${cflags}" add_ldflags "${ldflags}" + # ubuntu armv7/armel maybe need it + if is_plat "linux" && is_arch "armv7" "arm"; then + add_ldflags "-latomic" + fi option_end } |
