I've looked into switching to the gcc built-ins but from what I'm seeing there's no advantage to doing so. The instructions don't seem to allow such fine-grained memory ordering (and are usually way too expensive); they use function emulation for everything on ARM (despite some built- ins existing); and t's actually less portable since it requires sufficiently new versions of gcc and libgcc. And poking around the internet I see reports from at least one person that using the gcc built-ins produces a larger binary than using libatomic-ops when they compile it on ARM (presumably due to function emulation).
Unfortunately, we're having some difficulty configuring an ARM setup here, so I can't test this out myself. Still, I think I've discovered the problem and solution. Assuming you're comfortable hacking the header file, the following diff should make things work: --- /home/gregf/atomic_ops.h 2010-09-14 11:57:21.000000000 -0700 +++ /usr/include/atomic_ops.h 2010-02-04 15:39:58.000000000 -0800 @@ -234,7 +234,6 @@ # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS) # include "atomic_ops/sysdeps/gcc/arm.h" # define AO_CAN_EMUL_CAS -# define AO_GENERALIZE_TWICE # endif /* __arm__ */ # if defined(__cris__) || defined(CRIS) # include "atomic_ops/sysdeps/gcc/cris.h" I'm going to make contact with the upstream maintainers to discuss this issue as well. -- armel build failure (sync primitives) https://bugs.launchpad.net/bugs/635388 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
