[svn] commit: r3158 - in /branches/trac365: ./ src/bin/auth/ src/bin/auth/benchmarks/ src/bin/auth/tests/ src/bin/host/ src/lib/bench/ src/lib/bench/tests/ src/lib/cc/ src/lib/cc/tests/ src/lib/config/ src/lib/config/tests/ src/lib/datasrc/ src/lib/datasrc/tests/ src/lib/dns/ src/lib/dns/python/ src/lib/dns/rdata/generic/ src/lib/dns/tests/ src/lib/xfr/
BIND 10 source code commits
bind10-changes at lists.isc.org
Sun Oct 10 03:27:23 UTC 2010
Author: jinmei
Date: Sun Oct 10 03:27:23 2010
New Revision: 3158
Log:
overall cleanup for clang++ support: adding comment, configure setup, etc.
Modified:
branches/trac365/configure.ac
branches/trac365/src/bin/auth/Makefile.am
branches/trac365/src/bin/auth/benchmarks/Makefile.am
branches/trac365/src/bin/auth/tests/Makefile.am
branches/trac365/src/bin/host/Makefile.am
branches/trac365/src/lib/bench/Makefile.am
branches/trac365/src/lib/bench/tests/Makefile.am
branches/trac365/src/lib/cc/Makefile.am
branches/trac365/src/lib/cc/tests/Makefile.am
branches/trac365/src/lib/config/Makefile.am
branches/trac365/src/lib/config/tests/Makefile.am
branches/trac365/src/lib/datasrc/Makefile.am
branches/trac365/src/lib/datasrc/tests/Makefile.am
branches/trac365/src/lib/dns/Makefile.am
branches/trac365/src/lib/dns/python/Makefile.am
branches/trac365/src/lib/dns/rdata/generic/opt_41.cc
branches/trac365/src/lib/dns/tests/Makefile.am
branches/trac365/src/lib/dns/tests/name_unittest.cc
branches/trac365/src/lib/xfr/Makefile.am
Modified: branches/trac365/configure.ac
==============================================================================
--- branches/trac365/configure.ac (original)
+++ branches/trac365/configure.ac Sun Oct 10 03:27:23 2010
@@ -17,6 +17,8 @@
# Identify the compiler: this check must be after AC_PROG_CXX and AC_LANG.
AM_CONDITIONAL(USE_GXX, test "X${GXX}" = "Xyes")
AC_CHECK_DECL([__SUNPRO_CC], [SUNCXX="yes"], [SUNCXX="no"])
+AC_CHECK_DECL([__clang__], [CLANGPP="yes"], [CLANGPP="no"])
+AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
# Linker options
@@ -314,12 +316,14 @@
fi
done
fi
+CPPFLAGS_SAVES="$CPPFLAGS"
if test "${boost_include_path}" ; then
BOOST_INCLUDES="-I${boost_include_path}"
CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
fi
AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp],,
AC_MSG_ERROR([Missing required header files.]))
+CPPFLAGS="$CPPFLAGS_SAVES"
AC_SUBST(BOOST_INCLUDES)
#
@@ -597,6 +601,7 @@
Python: ${PYTHON_INCLUDES}
${PYTHON_LDFLAGS}
${PYTHON_LIB}
+ Boost: ${BOOST_INCLUDES}
SQLite: $SQLITE_CFLAGS
$SQLITE_LIBS
@@ -616,4 +621,3 @@
Now you can type "make" to build BIND 10
EOF
-
Modified: branches/trac365/src/bin/auth/Makefile.am
==============================================================================
--- branches/trac365/src/bin/auth/Makefile.am (original)
+++ branches/trac365/src/bin/auth/Makefile.am Sun Oct 10 03:27:23 2010
@@ -5,6 +5,7 @@
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
@@ -46,8 +47,10 @@
if USE_GXX
libasio_link_a_CXXFLAGS += -Wno-unused-parameter
endif
-libasio_link_a_CXXFLAGS += -Wno-unused-function
-libasio_link_a_CXXFLAGS += -Wno-char-subscripts
+if USE_CLANGPP
+# Same for clang++, but we need to turn off -Werror completely.
+libasio_link_a_CXXFLAGS += -Wno-error
+endif
libasio_link_a_CPPFLAGS = $(AM_CPPFLAGS)
BUILT_SOURCES = spec_config.h
Modified: branches/trac365/src/bin/auth/benchmarks/Makefile.am
==============================================================================
--- branches/trac365/src/bin/auth/benchmarks/Makefile.am (original)
+++ branches/trac365/src/bin/auth/benchmarks/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,5 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
Modified: branches/trac365/src/bin/auth/tests/Makefile.am
==============================================================================
--- branches/trac365/src/bin/auth/tests/Makefile.am (original)
+++ branches/trac365/src/bin/auth/tests/Makefile.am Sun Oct 10 03:27:23 2010
@@ -3,6 +3,7 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_builddir)/src/lib/dns -I$(top_srcdir)/src/bin
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(srcdir)/testdata\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(top_builddir)/src/bin/auth/tests/testdata\"
Modified: branches/trac365/src/bin/host/Makefile.am
==============================================================================
--- branches/trac365/src/bin/host/Makefile.am (original)
+++ branches/trac365/src/bin/host/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,5 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
Modified: branches/trac365/src/lib/bench/Makefile.am
==============================================================================
--- branches/trac365/src/lib/bench/Makefile.am (original)
+++ branches/trac365/src/lib/bench/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,6 +1,7 @@
SUBDIRS = . tests example
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
CLEANFILES = *.gcno *.gcda
Modified: branches/trac365/src/lib/bench/tests/Makefile.am
==============================================================================
--- branches/trac365/src/lib/bench/tests/Makefile.am (original)
+++ branches/trac365/src/lib/bench/tests/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,4 +1,5 @@
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(srcdir)/testdata\"
AM_CXXFLAGS = $(B10_CXXFLAGS)
Modified: branches/trac365/src/lib/cc/Makefile.am
==============================================================================
--- branches/trac365/src/lib/cc/Makefile.am (original)
+++ branches/trac365/src/lib/cc/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,20 +1,23 @@
SUBDIRS = . tests
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
AM_CXXFLAGS = $(B10_CXXFLAGS)
-# ASIO header files used in session.cc will trigger "unused-parameter"
-# error. Unfortunately there doesn't seem to be an easy way to selectively
+if USE_GXX
+# ASIO header files used in session.cc will trigger the "unused-parameter"
+# warning. Unfortunately there doesn't seem to be an easy way to selectively
# avoid the error. As a short term workaround we suppress this warning
# for the entire this module. See also src/bin/auth/Makefile.am.
-if USE_GXX
AM_CXXFLAGS += -Wno-unused-parameter
endif
-
-#for clang++
-AM_CXXFLAGS += -Wno-unused-function
-AM_CXXFLAGS += -Wno-char-subscripts
+if USE_CLANGPP
+# Likewise, ASIO header files will trigger various warnings with clang++.
+# Worse, there doesn't seem to be any option to disable one of the warnings
+# in any way, so we need to turn off -Werror.
+AM_CXXFLAGS += -Wno-error
+endif
lib_LTLIBRARIES = libcc.la
libcc_la_SOURCES = data.cc data.h session.cc session.h
Modified: branches/trac365/src/lib/cc/tests/Makefile.am
==============================================================================
--- branches/trac365/src/lib/cc/tests/Makefile.am (original)
+++ branches/trac365/src/lib/cc/tests/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,13 +1,14 @@
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
AM_CXXFLAGS = $(B10_CXXFLAGS)
if USE_GXX #XXX: see ../Makefile.am
AM_CXXFLAGS += -Wno-unused-parameter
endif
-#for clang++
-AM_CXXFLAGS += -Wno-unused-function
-AM_CXXFLAGS += -Wno-char-subscripts
+if USE_CLANGPP
+AM_CXXFLAGS += -Wno-error
+endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
Modified: branches/trac365/src/lib/config/Makefile.am
==============================================================================
--- branches/trac365/src/lib/config/Makefile.am (original)
+++ branches/trac365/src/lib/config/Makefile.am Sun Oct 10 03:27:23 2010
@@ -2,6 +2,7 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS) -Wno-strict-aliasing
lib_LTLIBRARIES = libcfgclient.la
Modified: branches/trac365/src/lib/config/tests/Makefile.am
==============================================================================
--- branches/trac365/src/lib/config/tests/Makefile.am (original)
+++ branches/trac365/src/lib/config/tests/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,6 +1,7 @@
SUBDIRS = testdata .
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
# see src/lib/cc/Makefile.am for -Wno-unused-parameter
Modified: branches/trac365/src/lib/datasrc/Makefile.am
==============================================================================
--- branches/trac365/src/lib/datasrc/Makefile.am (original)
+++ branches/trac365/src/lib/datasrc/Makefile.am Sun Oct 10 03:27:23 2010
@@ -2,6 +2,7 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += $(SQLITE_CFLAGS)
AM_CXXFLAGS = $(B10_CXXFLAGS)
Modified: branches/trac365/src/lib/datasrc/tests/Makefile.am
==============================================================================
--- branches/trac365/src/lib/datasrc/tests/Makefile.am (original)
+++ branches/trac365/src/lib/datasrc/tests/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,5 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_builddir)/src/lib/dns -I$(top_srcdir)/src/lib/dns
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(srcdir)/testdata\"
AM_CXXFLAGS = $(B10_CXXFLAGS)
Modified: branches/trac365/src/lib/dns/Makefile.am
==============================================================================
--- branches/trac365/src/lib/dns/Makefile.am (original)
+++ branches/trac365/src/lib/dns/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,6 +1,7 @@
SUBDIRS = . tests python
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
CLEANFILES = *.gcno *.gcda
Modified: branches/trac365/src/lib/dns/python/Makefile.am
==============================================================================
--- branches/trac365/src/lib/dns/python/Makefile.am (original)
+++ branches/trac365/src/lib/dns/python/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,6 +1,7 @@
SUBDIRS = . tests
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
pyexec_LTLIBRARIES = pydnspp.la
Modified: branches/trac365/src/lib/dns/rdata/generic/opt_41.cc
==============================================================================
--- branches/trac365/src/lib/dns/rdata/generic/opt_41.cc (original)
+++ branches/trac365/src/lib/dns/rdata/generic/opt_41.cc Sun Oct 10 03:27:23 2010
@@ -72,7 +72,8 @@
OPT::compare(const Rdata& other) const
{
//const OPT& other_opt = dynamic_cast<const OPT&>(other);
- (void)dynamic_cast<const OPT&>(other); // right now we don't need other_opt
+ // right now we don't need other_opt:
+ static_cast<void>(dynamic_cast<const OPT&>(other));
return (0);
}
Modified: branches/trac365/src/lib/dns/tests/Makefile.am
==============================================================================
--- branches/trac365/src/lib/dns/tests/Makefile.am (original)
+++ branches/trac365/src/lib/dns/tests/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,6 +1,7 @@
SUBDIRS = testdata .
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
AM_CPPFLAGS += -DTEST_DATA_SRCDIR=\"$(srcdir)/testdata\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(top_builddir)/src/lib/dns/tests/testdata\"
Modified: branches/trac365/src/lib/dns/tests/name_unittest.cc
==============================================================================
--- branches/trac365/src/lib/dns/tests/name_unittest.cc (original)
+++ branches/trac365/src/lib/dns/tests/name_unittest.cc Sun Oct 10 03:27:23 2010
@@ -443,7 +443,6 @@
}
TEST_F(NameTest, isWildcard) {
- //EXPECT_EQ(false, example_name.isWildcard());
EXPECT_FALSE(example_name.isWildcard());
EXPECT_EQ(true, Name("*.a.example.com").isWildcard());
EXPECT_FALSE(Name("a.*.example.com").isWildcard());
Modified: branches/trac365/src/lib/xfr/Makefile.am
==============================================================================
--- branches/trac365/src/lib/xfr/Makefile.am (original)
+++ branches/trac365/src/lib/xfr/Makefile.am Sun Oct 10 03:27:23 2010
@@ -1,11 +1,12 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
+AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS) -Wno-strict-aliasing
AM_CXXFLAGS += -Wno-unused-parameter # see src/lib/cc/Makefile.am
-#for clang++
-AM_CXXFLAGS += -Wno-unused-function
-AM_CXXFLAGS += -Wno-char-subscripts
+if USE_CLANGPP
+AM_CXXFLAGS += -Wno-error
+endif
CLEANFILES = *.gcno *.gcda
More information about the bind10-changes
mailing list