summaryrefslogtreecommitdiffstats
path: root/src/util/Makefile.am
diff options
context:
space:
mode:
authorGrazvydas Ignotas <[email protected]>2017-09-18 22:11:26 +0300
committerGrazvydas Ignotas <[email protected]>2017-09-22 17:01:21 +0300
commit2ef7f23820a67e958c2252bd81eb0458903ebf33 (patch)
treec8d6caee4989715a8da4614c6b15dfd803063e71 /src/util/Makefile.am
parent6ace0b8bc8e5c9d7f0a1ec38706f7c49b738b7c6 (diff)
configure: check if -latomic is needed for __atomic_*
On some platforms, gcc generates library calls when __atomic_* functions are used, but does not link the required library (libatomic) automatically (supposedly to allow the app to use some other atomics implementation?). Detect this at configure time and add the library when needed. Tested on armel (library was added) and on x86_64 (was not, as expected). Some documentation on this is provided in GCC wiki: https://gcc.gnu.org/wiki/Atomic/GCCMM Fixes: 8915f0c0 "util: use GCC atomic intrinsics with explicit memory model" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102573 Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/util/Makefile.am')
-rw-r--r--src/util/Makefile.am3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 9885bbe9685..c37afff7520 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -48,7 +48,8 @@ libmesautil_la_SOURCES = \
libmesautil_la_LIBADD = \
$(CLOCK_LIB) \
- $(ZLIB_LIBS)
+ $(ZLIB_LIBS) \
+ $(LIBATOMIC_LIBS)
libxmlconfig_la_SOURCES = $(XMLCONFIG_FILES)
libxmlconfig_la_CFLAGS = \