aboutsummaryrefslogtreecommitdiff
path: root/src/util/Makefile.am
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2019-02-21 18:41:52 +0100
committerDaniel Golle <daniel@makrotopia.org>2019-02-23 13:47:53 +0100
commitad2d3029a06795dd72b32e5613e58dd1d3e0404f (patch)
tree7e89cecfd0526efcaf1b1a5aa43605000fec4247 /src/util/Makefile.am
parentf1e8076ed474a429aff32839ed5f8fc20371839c (diff)
downloadgnunet-ad2d3029a06795dd72b32e5613e58dd1d3e0404f.tar.gz
gnunet-ad2d3029a06795dd72b32e5613e58dd1d3e0404f.zip
util: build with external libatomic
Recent versions of gcc on some architectures (MIPS, PPC, ...) moved atomic functions into a separate library. As we are using atomic load/store in util/time.c we may need to link libgnunetutil against libatomic for __atomic_load_8 and __atomic_store_8 to be defined. Fixes build problem on MIPS: ld: ./.libs/libgnunetutil.so: undefined reference to `__atomic_store_8' ld: ./.libs/libgnunetutil.so: undefined reference to `__atomic_load_8' collect2: error: ld returned 1 exit status Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'src/util/Makefile.am')
-rw-r--r--src/util/Makefile.am7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 0ba06f4bb..5fa6e907e 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -123,6 +123,12 @@ libgnunetutil_la_SOURCES = \
123 speedup.c speedup.h \ 123 speedup.c speedup.h \
124 proc_compat.c 124 proc_compat.c
125 125
126if HAVE_LIBATOMIC
127 LIBATOMIC= -latomic
128else
129 LIBATOMIC=
130endif
131
126if HAVE_LIBIDN 132if HAVE_LIBIDN
127 LIBIDN= -lidn 133 LIBIDN= -lidn
128else 134else
@@ -137,6 +143,7 @@ endif
137 143
138libgnunetutil_la_LIBADD = \ 144libgnunetutil_la_LIBADD = \
139 $(GCLIBADD) $(WINLIB) \ 145 $(GCLIBADD) $(WINLIB) \
146 $(LIBATOMIC) \
140 $(LIBGCRYPT_LIBS) \ 147 $(LIBGCRYPT_LIBS) \
141 $(LTLIBICONV) \ 148 $(LTLIBICONV) \
142 $(LTLIBINTL) \ 149 $(LTLIBINTL) \