On Fri, Feb 19, 2010 at 3:38 AM, Aldy Hernandez <al...@redhat.com> wrote: > libitm.so won't build on ia32 because of an undefined reference to > __sync_add_and_fetch_8. > > This is the build failure Pearly encountered here: > > http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01201.html > > What happens is that we try to do a __sync_and_fetch() on global_tid, > which is of type _ITM_transactionId_t, a 64-bit quantity: > > typedef uint64_t _ITM_transactionId_t; /* Transaction identifier */ > > Since the TM library on ia32 is built with -m486, which doesn't have > 64-bit atomic operations, should we... > > a) Build with -m586 and above. > b) Have _ITM_transactionId_t be 32-bit quantities. > c) Come up with some locking solution for archs that don't have > 64-bit atomic operations. >
FWIW, as of 2010-02-28, gcc will default to i686 unless you configure gcc with i[345]86-os. -- H.J.