[bind10-dev] nsas build issues

Jeremy C. Reed jreed at isc.org
Wed Dec 15 17:50:08 UTC 2010


On Wed, 15 Dec 2010, Jelte Jansen wrote:

> attached is a patch for that (also removes the no-missing- from the makefile,
> but not yet the -pthreads addition, as i think that may need a higher-level
> solution)

For the need of multithreading flag, I am using:

Index: src/lib/nsas/tests/Makefile.am
===================================================================
--- src/lib/nsas/tests/Makefile.am	(revision 3849)
+++ src/lib/nsas/tests/Makefile.am	(working copy)
@@ -1,12 +1,12 @@
 SUBDIRS = .
 
 AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
-AM_CPPFLAGS += $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(BOOST_INCLUDES) $(MULTITHREADING_FLAG)
 AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
 AM_CPPFLAGS += -I$(top_srcdir)/src/lib/nsas -I$(top_builddir)/src/lib/nsas
 AM_CXXFLAGS = $(B10_CXXFLAGS)
 
-AM_LDFLAGS =
+AM_LDFLAGS = $(PTHREAD_LDFLAGS)
 if USE_STATIC_LINK
 AM_LDFLAGS += -static
 endif
Index: src/lib/nsas/Makefile.am
===================================================================
--- src/lib/nsas/Makefile.am	(revision 3849)
+++ src/lib/nsas/Makefile.am	(working copy)
@@ -1,7 +1,7 @@
 SUBDIRS = . tests
 
 AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
-AM_CPPFLAGS += $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(BOOST_INCLUDES) $(MULTITHREADING_FLAG)
 AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
 AM_CPPFLAGS += -I$(top_srcdir)/src/lib/nsas -I$(top_builddir)/src/lib/nsas
 AM_CPPFLAGS += $(SQLITE_CFLAGS)
Index: configure.ac
===================================================================
--- configure.ac	(revision 3849)
+++ configure.ac	(working copy)
@@ -201,11 +201,13 @@
 # (http://blogs.sun.com/sga/entry/boost_mini_howto)
 if test "$SUNCXX" = "yes"; then
 CXXFLAGS="$CXXFLAGS -library=stlport4 -features=tmplife -features=tmplrefstatic"
+MULTITHREADING_FLAG="-mt"
 fi
 
 # gcc specific settings:
 if test "X$GXX" = "Xyes"; then
 B10_CXXFLAGS="-Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
+MULTITHREADING_FLAG=-pthread
 
 # Certain versions of gcc (g++) have a bug that incorrectly warns about
 # the use of anonymous name spaces even if they're closed in a single
@@ -388,6 +390,8 @@
 AC_CHECK_LIB(pthread, pthread_create,[ PTHREAD_LDFLAGS=-lpthread ], [])
 AC_SUBST(PTHREAD_LDFLAGS)
 
+AC_SUBST(MULTITHREADING_FLAG)
+
 #
 # ASIO: we extensively use it as the C++ event management module.
 #



More information about the bind10-dev mailing list