http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58490
--- Comment #3 from Erik van der Werf <erikvanderwerf at gmail dot com> --- I'm sorry, that patch definitely looks relevant, and I'd like to try it, but somehow I did not manage to rebuild the arm-linux-gnueabi-gcc-4.7 package. I'm not a gcc expert, and trying to figure out how to configure the build for cross compilation turns out to be rather time consuming, so for now I'll just stay with gcc-4.6. BTW I also tried the new atomic built-ins (__atomic_compare_exchange) and those show the exact same problem.