|
|
@@ -20751,75 +20751,6 @@ cat >>confdefs.h <<\_ACEOF
|
|
|
#define ATOMIC_64BIT_OPERATIONS 1
|
|
|
_ACEOF
|
|
|
|
|
|
- { $as_echo "$as_me:$LINENO: checking whether __sync_add_and_fetch is declared" >&5
|
|
|
-$as_echo_n "checking whether __sync_add_and_fetch is declared... " >&6; }
|
|
|
-if test "${ac_cv_have_decl___sync_add_and_fetch+set}" = set; then
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- cat >conftest.$ac_ext <<_ACEOF
|
|
|
-/* confdefs.h. */
|
|
|
-_ACEOF
|
|
|
-cat confdefs.h >>conftest.$ac_ext
|
|
|
-cat >>conftest.$ac_ext <<_ACEOF
|
|
|
-/* end confdefs.h. */
|
|
|
-$ac_includes_default
|
|
|
-int
|
|
|
-main ()
|
|
|
-{
|
|
|
-#ifndef __sync_add_and_fetch
|
|
|
- (void) __sync_add_and_fetch;
|
|
|
-#endif
|
|
|
-
|
|
|
- ;
|
|
|
- return 0;
|
|
|
-}
|
|
|
-_ACEOF
|
|
|
-rm -f conftest.$ac_objext
|
|
|
-if { (ac_try="$ac_compile"
|
|
|
-case "(($ac_try" in
|
|
|
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
|
|
- *) ac_try_echo=$ac_try;;
|
|
|
-esac
|
|
|
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
|
|
-$as_echo "$ac_try_echo") >&5
|
|
|
- (eval "$ac_compile") 2>conftest.er1
|
|
|
- ac_status=$?
|
|
|
- grep -v '^ *+' conftest.er1 >conftest.err
|
|
|
- rm -f conftest.er1
|
|
|
- cat conftest.err >&5
|
|
|
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
|
- (exit $ac_status); } && {
|
|
|
- test -z "$ac_c_werror_flag" ||
|
|
|
- test ! -s conftest.err
|
|
|
- } && test -s conftest.$ac_objext; then
|
|
|
- ac_cv_have_decl___sync_add_and_fetch=yes
|
|
|
-else
|
|
|
- $as_echo "$as_me: failed program was:" >&5
|
|
|
-sed 's/^/| /' conftest.$ac_ext >&5
|
|
|
-
|
|
|
- ac_cv_have_decl___sync_add_and_fetch=no
|
|
|
-fi
|
|
|
-
|
|
|
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___sync_add_and_fetch" >&5
|
|
|
-$as_echo "$ac_cv_have_decl___sync_add_and_fetch" >&6; }
|
|
|
-if test "x$ac_cv_have_decl___sync_add_and_fetch" = x""yes; then
|
|
|
-
|
|
|
-cat >>confdefs.h <<_ACEOF
|
|
|
-#define HAVE_DECL___SYNC_ADD_AND_FETCH 1
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-
|
|
|
-else
|
|
|
- cat >>confdefs.h <<_ACEOF
|
|
|
-#define HAVE_DECL___SYNC_ADD_AND_FETCH 0
|
|
|
-_ACEOF
|
|
|
-
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-
|
|
|
;;
|
|
|
x86_64-*-linux*)
|
|
|
|
|
|
@@ -20832,38 +20763,34 @@ cat >>confdefs.h <<\_ACEOF
|
|
|
#define ATOMIC_64BIT_OPERATIONS 1
|
|
|
_ACEOF
|
|
|
|
|
|
- { $as_echo "$as_me:$LINENO: checking whether __sync_add_and_fetch is declared" >&5
|
|
|
-$as_echo_n "checking whether __sync_add_and_fetch is declared... " >&6; }
|
|
|
-if test "${ac_cv_have_decl___sync_add_and_fetch+set}" = set; then
|
|
|
- $as_echo_n "(cached) " >&6
|
|
|
-else
|
|
|
- cat >conftest.$ac_ext <<_ACEOF
|
|
|
+ ;;
|
|
|
+ esac
|
|
|
+ { $as_echo "$as_me:$LINENO: checking for GCC provided 64-bit atomic functions ..." >&5
|
|
|
+$as_echo_n "checking for GCC provided 64-bit atomic functions ...... " >&6; }
|
|
|
+ cat >conftest.$ac_ext <<_ACEOF
|
|
|
/* confdefs.h. */
|
|
|
_ACEOF
|
|
|
cat confdefs.h >>conftest.$ac_ext
|
|
|
cat >>conftest.$ac_ext <<_ACEOF
|
|
|
/* end confdefs.h. */
|
|
|
-$ac_includes_default
|
|
|
+
|
|
|
int
|
|
|
main ()
|
|
|
{
|
|
|
-#ifndef __sync_add_and_fetch
|
|
|
- (void) __sync_add_and_fetch;
|
|
|
-#endif
|
|
|
-
|
|
|
+long long ptrval = 0, val = 0, newval = 1; (void)__sync_bool_compare_and_swap_8(&ptrval, val, newval);
|
|
|
;
|
|
|
return 0;
|
|
|
}
|
|
|
_ACEOF
|
|
|
-rm -f conftest.$ac_objext
|
|
|
-if { (ac_try="$ac_compile"
|
|
|
+rm -f conftest.$ac_objext conftest$ac_exeext
|
|
|
+if { (ac_try="$ac_link"
|
|
|
case "(($ac_try" in
|
|
|
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
|
|
*) ac_try_echo=$ac_try;;
|
|
|
esac
|
|
|
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
|
|
|
$as_echo "$ac_try_echo") >&5
|
|
|
- (eval "$ac_compile") 2>conftest.er1
|
|
|
+ (eval "$ac_link") 2>conftest.er1
|
|
|
ac_status=$?
|
|
|
grep -v '^ *+' conftest.er1 >conftest.err
|
|
|
rm -f conftest.er1
|
|
|
@@ -20872,37 +20799,36 @@ $as_echo "$ac_try_echo") >&5
|
|
|
(exit $ac_status); } && {
|
|
|
test -z "$ac_c_werror_flag" ||
|
|
|
test ! -s conftest.err
|
|
|
- } && test -s conftest.$ac_objext; then
|
|
|
- ac_cv_have_decl___sync_add_and_fetch=yes
|
|
|
+ } && test -s conftest$ac_exeext && {
|
|
|
+ test "$cross_compiling" = yes ||
|
|
|
+ $as_test_x conftest$ac_exeext
|
|
|
+ }; then
|
|
|
+ have_gcc_64bit_cas=1; { $as_echo "$as_me:$LINENO: result: yes" >&5
|
|
|
+$as_echo "yes" >&6; }
|
|
|
else
|
|
|
$as_echo "$as_me: failed program was:" >&5
|
|
|
sed 's/^/| /' conftest.$ac_ext >&5
|
|
|
|
|
|
- ac_cv_have_decl___sync_add_and_fetch=no
|
|
|
+ have_gcc_64bit_cas=; { $as_echo "$as_me:$LINENO: result: no" >&5
|
|
|
+$as_echo "no" >&6; }
|
|
|
fi
|
|
|
|
|
|
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
|
-fi
|
|
|
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___sync_add_and_fetch" >&5
|
|
|
-$as_echo "$ac_cv_have_decl___sync_add_and_fetch" >&6; }
|
|
|
-if test "x$ac_cv_have_decl___sync_add_and_fetch" = x""yes; then
|
|
|
+rm -rf conftest.dSYM
|
|
|
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
|
|
+ conftest$ac_exeext conftest.$ac_ext
|
|
|
+ if test -n "$have_gcc_64bit_cas" ; then
|
|
|
|
|
|
-cat >>confdefs.h <<_ACEOF
|
|
|
+cat >>confdefs.h <<\_ACEOF
|
|
|
#define HAVE_DECL___SYNC_ADD_AND_FETCH 1
|
|
|
_ACEOF
|
|
|
|
|
|
+ else
|
|
|
|
|
|
-else
|
|
|
- cat >>confdefs.h <<_ACEOF
|
|
|
+cat >>confdefs.h <<\_ACEOF
|
|
|
#define HAVE_DECL___SYNC_ADD_AND_FETCH 0
|
|
|
_ACEOF
|
|
|
|
|
|
-
|
|
|
-fi
|
|
|
-
|
|
|
-
|
|
|
- ;;
|
|
|
- esac
|
|
|
+ fi
|
|
|
# some programs use the native thread library directly
|
|
|
THREADLIB=-lpthread
|
|
|
THREADLIB=$THREADLIB
|