On 09.03.2012 15:40, Daniel Shahaf wrote:
[email protected] wrote on Thu, Mar 08, 2012 at 20:07:43 -0000:
Author: stefan2
Date: Thu Mar  8 20:07:43 2012
New Revision: 1298554

URL: http://svn.apache.org/viewvc?rev=1298554&view=rev
Log:
Teach subversion to detect the availability of GCC's atomic built-ins
for 64 bit items. This code was taken from APR and tweaked slightly.

* build/ac-macros/svn-macros.m4
   (SVN_CHECK_FOR_ATOMIC_BUILTINS): new macro
* configure.ac
   call the new macro, set SVN_HAS_ATOMIC_BUILTINS #define

Modified:
     subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4
     subversion/branches/revprop-cache/configure.ac

Modified: subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4
URL: 
http://svn.apache.org/viewvc/subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4?rev=1298554&r1=1298553&r2=1298554&view=diff
==============================================================================
--- subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4 (original)
+++ subversion/branches/revprop-cache/build/ac-macros/svn-macros.m4 Thu Mar  8 
20:07:43 2012
@@ -202,3 +202,44 @@ AC_DEFUN([SVN_REMOVE_STANDARD_LIB_DIRS],
      printf "%s" "${output_flags# }"
    fi
  ])
+
+AC_DEFUN([SVN_CHECK_FOR_ATOMIC_BUILTINS],
+[
+  AC_CACHE_CHECK([whether the compiler provides atomic builtins], 
[ap_cv_atomic_builtins],
How does this interact with
  http://subversion.apache.org/docs/release-notes/1.7#rhel-2-issue
?  (which says: "Workarounds include using a more recent gcc or
configuring APR with --disable-nonportable-atomics.")

Should the new code be disabled for old gcc's?

That bug is in APR/atomic/unix/ia32.c. The built-ins that
I check for are similar to APR/atomic/unix/builtins.c.
But I would be fine with disabling this code for older GCCs.

We need to test it on 32 bit unix anyways since the compiler
needs to create a longer instruction sequence on those
machines. Writing a thorough test for the new API will be
some non-trivial task.

-- Stefan^2.

Reply via email to