Skip to content
This repository
Browse code

Merge pull request #2667 from ulion/fix_unreference_gcc_builtin_atomi…

…c_func

Fix undefined reference caused by wrong detection of gcc builtin atomic functions.
  • Loading branch information...
commit f13ff297a6e4673cd7e2fa2a695d6aa046486eb6 2 parents 104515a + 07c1ed5
ulion authored May 01, 2013

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  configure.in
6  configure.in
@@ -850,7 +850,7 @@ AC_CHECK_SIZEOF([size_t])
850 850
 
851 851
 # Check for intrinsics
852 852
 AC_MSG_CHECKING([for __sync_add_and_fetch(temp, 1)])
853  
-AC_TRY_COMPILE([],[long* temp=0; __sync_add_and_fetch(temp, 1);],
  853
+AC_TRY_LINK([],[long* temp=0; long ret=__sync_add_and_fetch(temp, 1);],
854 854
                 [have_builtin_sync_add_and_fetch=yes],
855 855
                 [have_builtin_sync_add_and_fetch=no])
856 856
 AC_MSG_RESULT($have_builtin_sync_add_and_fetch)
@@ -860,7 +860,7 @@ if test "x$have_builtin_sync_add_and_fetch" = "xyes"; then
860 860
 fi
861 861
 
862 862
 AC_MSG_CHECKING([for __sync_sub_and_fetch(temp, 1)])
863  
-AC_TRY_COMPILE([],[long* temp=0; __sync_sub_and_fetch(temp, 1);],
  863
+AC_TRY_LINK([],[long* temp=0; long ret=__sync_sub_and_fetch(temp, 1);],
864 864
                 [have_builtin_sync_sub_and_fetch=yes],
865 865
                 [have_builtin_sync_sub_and_fetch=no])
866 866
 AC_MSG_RESULT($have_builtin_sync_sub_and_fetch)
@@ -870,7 +870,7 @@ if test "x$have_builtin_sync_sub_and_fetch" = "xyes"; then
870 870
 fi
871 871
 
872 872
 AC_MSG_CHECKING([for __sync_val_compare_and_swap(temp, 1, 1)])
873  
-AC_TRY_COMPILE([],[long *temp = 0; __sync_val_compare_and_swap(temp, 1, 1);],
  873
+AC_TRY_LINK([],[long *temp = 0; long ret=__sync_val_compare_and_swap(temp, 1, 1);],
874 874
                 [have_builtin_sync_val_compare_and_swap=yes],
875 875
                 [have_builtin_sync_val_compare_and_swap=no])
876 876
 AC_MSG_RESULT($have_builtin_sync_val_compare_and_swap)

0 notes on commit f13ff29

Please sign in to comment.
Something went wrong with that request. Please try again.