diff options
author | Ulion <ulion2002@gmail.com> | 2013-04-29 06:09:14 +0800 |
---|---|---|
committer | Ulion <ulion2002@gmail.com> | 2013-04-29 07:36:24 +0800 |
commit | 07c1ed5752225f44a55ed9099c5cbfd34bff0906 (patch) | |
tree | 080aa3019cf2ba76eb35854c725d2ea81bb7d73e /configure.in | |
parent | 44f0991a2f2a8449e6f8fe1869304872e186269a (diff) |
Fix undefined reference caused by wrong detection of gcc builtin atomic functions.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/configure.in b/configure.in index f0e49051ed..95f12daa8f 100644 --- a/configure.in +++ b/configure.in @@ -850,7 +850,7 @@ AC_CHECK_SIZEOF([size_t]) # Check for intrinsics AC_MSG_CHECKING([for __sync_add_and_fetch(temp, 1)]) -AC_TRY_COMPILE([],[long* temp=0; __sync_add_and_fetch(temp, 1);], +AC_TRY_LINK([],[long* temp=0; long ret=__sync_add_and_fetch(temp, 1);], [have_builtin_sync_add_and_fetch=yes], [have_builtin_sync_add_and_fetch=no]) AC_MSG_RESULT($have_builtin_sync_add_and_fetch) @@ -860,7 +860,7 @@ if test "x$have_builtin_sync_add_and_fetch" = "xyes"; then fi AC_MSG_CHECKING([for __sync_sub_and_fetch(temp, 1)]) -AC_TRY_COMPILE([],[long* temp=0; __sync_sub_and_fetch(temp, 1);], +AC_TRY_LINK([],[long* temp=0; long ret=__sync_sub_and_fetch(temp, 1);], [have_builtin_sync_sub_and_fetch=yes], [have_builtin_sync_sub_and_fetch=no]) AC_MSG_RESULT($have_builtin_sync_sub_and_fetch) @@ -870,7 +870,7 @@ if test "x$have_builtin_sync_sub_and_fetch" = "xyes"; then fi AC_MSG_CHECKING([for __sync_val_compare_and_swap(temp, 1, 1)]) -AC_TRY_COMPILE([],[long *temp = 0; __sync_val_compare_and_swap(temp, 1, 1);], +AC_TRY_LINK([],[long *temp = 0; long ret=__sync_val_compare_and_swap(temp, 1, 1);], [have_builtin_sync_val_compare_and_swap=yes], [have_builtin_sync_val_compare_and_swap=no]) AC_MSG_RESULT($have_builtin_sync_val_compare_and_swap) |