今天用arm-none-linux-gnueabi交叉编译libmysqclient.so,出现Native atomics support not found问题
进入mysql-connector-c-6.16-src的include/my_atomic.h,里面有
# include "atomic/generic-msvc.h"
#elif defined(HAVE_SOLARIS_ATOMIC)
# include "atomic/solaris.h"
#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
# include "atomic/gcc_builtins.h"
# error Native atomics support not found!
简单的解决方式就说把这注释掉,在上面加上#include "atomic/gcc_builtins.h"
#include "atomic/gcc_builtins.h"
# include "atomic/generic-msvc.h"
#elif defined(HAVE_SOLARIS_ATOMIC)
# include "atomic/solaris.h"
#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
# include "atomic/gcc_builtins.h"
# error Native atomics support not found!