mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-06 00:31:13 +01:00
Consolidation of libatomic checks (#3314)
Problem: compiler might not support atomic warning flag Solution: check before using it
This commit is contained in:
parent
d98325160f
commit
cad2423d82
@ -195,7 +195,6 @@ case "${host_os}" in
|
|||||||
case "${host_os}" in
|
case "${host_os}" in
|
||||||
*android*)
|
*android*)
|
||||||
AC_DEFINE(ZMQ_HAVE_ANDROID, 1, [Have Android OS])
|
AC_DEFINE(ZMQ_HAVE_ANDROID, 1, [Have Android OS])
|
||||||
AC_CHECK_LIB([atomic],[__atomic_load_4],[LIBS="${LIBS} -latomic"])
|
|
||||||
libzmq_on_android="yes"
|
libzmq_on_android="yes"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -638,6 +637,10 @@ AM_CONDITIONAL(ON_DEBIAN_KFREEBSD, test "x$libzmq_on_debian_kfreebsd" = "xyes")
|
|||||||
|
|
||||||
# Check for __atomic_Xxx compiler intrinsics
|
# Check for __atomic_Xxx compiler intrinsics
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
|
AX_CHECK_COMPILE_FLAG([-Wno-atomic-alignment],
|
||||||
|
[CXXFLAGS+=" -Wno-atomic-alignment"],
|
||||||
|
[],
|
||||||
|
[-Werror])
|
||||||
LIBZMQ_CHECK_ATOMIC_INTRINSICS([
|
LIBZMQ_CHECK_ATOMIC_INTRINSICS([
|
||||||
AC_DEFINE([ZMQ_HAVE_ATOMIC_INTRINSICS],
|
AC_DEFINE([ZMQ_HAVE_ATOMIC_INTRINSICS],
|
||||||
[1],
|
[1],
|
||||||
|
Loading…
Reference in New Issue
Block a user