Clang expects 8-byte alignment for some 64-bit atomic operations
in some 32-bit targets. Native instruction lock cmpxchg8b (for x86)
should only require 4-byte alignment.
As a result laterst maridb fails to build with clang on 32bit/x86 architecture because it
can not find the missing symbol
undefined reference to `__atomic_fetch_or_8'
here is a shortened testcase that can reproduce the problem with clang
compiles ok with `gcc -m32` or `clang -m32` fine but interesting thing happens with
`gcc -DBUGGY -m32` or `clang -DBUGGY -m32`
and you see the difference. Clang says
but gcc sails along.
so I guess we need to make sure that any data being accessed atomically is aligned to 64bit as well to
help the compiler a bit here.