configure: Check for and explicitly link against -latomic
Some C libraries, such as uClibc, require an explicit link for some atomic functions. Check for any libatomic, and explcily link it.
This commit is contained in:
@@ -490,6 +490,11 @@ LIBS=$DLLIB
|
||||
AC_SEARCH_LIBS(pthread_create, pthread, [PTHREADLIB=$LIBS])
|
||||
AC_SUBST(PTHREADLIB)
|
||||
|
||||
# uClibc requires explicit -latomic for __atomic_* operations
|
||||
LIBS=""
|
||||
AC_SEARCH_LIBS(__atomic_load, atomic, [ATOMICLIB=$LIBS])
|
||||
AC_SUBST(ATOMICLIB)
|
||||
|
||||
LIBS=$saved_LIBS
|
||||
# ------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user