Add support for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} on x86.

This fixes std::thread with libstdc++.
[test] remove printing the file to stdout