[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: util: build with external l
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: util: build with external libatomic |
Date: |
Sat, 23 Feb 2019 13:48:25 +0100 |
This is an automated email from the git hooks/post-receive script.
daniel-golle pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new ad2d3029a util: build with external libatomic
ad2d3029a is described below
commit ad2d3029a06795dd72b32e5613e58dd1d3e0404f
Author: Daniel Golle <address@hidden>
AuthorDate: Thu Feb 21 18:41:52 2019 +0100
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 <address@hidden>
---
configure.ac | 3 +++
src/util/Makefile.am | 7 +++++++
2 files changed, 10 insertions(+)
diff --git a/configure.ac b/configure.ac
index 87a60cb04..745300939 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,6 +282,7 @@ have_addrinfo_a=0
AC_CHECK_LIB(anl, getaddrinfo_a, [have_addrinfo_a=1
AC_DEFINE(HAVE_GETADDRINFO_A,1,[getaddrinfo_a supported])])
AM_CONDITIONAL(HAVE_GETADDRINFO_A, [test "$have_addrinfo_a" = 1])
+
# tests only run on Windows
if test "x$build_target" = "xmingw"
then
@@ -676,6 +677,8 @@ else
AC_DEFINE([HAVE_LIBCURL],[1],[Have CURL])
fi
+AC_SEARCH_LIBS(__atomic_load_8, atomic, [have_libatomic=1
AC_DEFINE(HAVE_LIBATOMIC,1,[external libatomic])])
+AM_CONDITIONAL(HAVE_LIBATOMIC, [test "$have_libatomic" = 1])
# restore LIBS & CPPFLAGS
LIBS=$SAVE_LIBS
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 = \
speedup.c speedup.h \
proc_compat.c
+if HAVE_LIBATOMIC
+ LIBATOMIC= -latomic
+else
+ LIBATOMIC=
+endif
+
if HAVE_LIBIDN
LIBIDN= -lidn
else
@@ -137,6 +143,7 @@ endif
libgnunetutil_la_LIBADD = \
$(GCLIBADD) $(WINLIB) \
+ $(LIBATOMIC) \
$(LIBGCRYPT_LIBS) \
$(LTLIBICONV) \
$(LTLIBINTL) \
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: util: build with external libatomic,
gnunet <=