On Fri, Jun 5, 2009 at 1:57 PM, Andrew Haley<aph@xxxxxxxxxx> wrote: > i386 has lock incl, surely, so __sync_add_and_fetch isn't a problem. > It's stuff like __sync_val_compare_and_swap you don't have. I thought the lock instruction didn't exist until the pentium pro? Hmm, I'm a bit confused. Our internal build environment will fail building software that uses __sync_add_and_fetch with a link error on it being undefined if I don't pass it CXXFLAGS="-march=i686". The environment prints its invocations of gcc to standard out so I can see that it isn't passing any march flags itself -- infact I can see that it's just passing normal -I and -L's. Do you have any idea what it could be doing differently that would cause it to give the error then but not when I invoke gcc by hand?