diff --git a/CHANGES b/CHANGES index af6b3fc..e10efe7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +v0.6.1 +====== + +./configure --enable-static-cxx + v0.6.0 ====== diff --git a/Makefile.in b/Makefile.in index 02e65f2..46e91fd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -111,7 +111,14 @@ CXXFLAGS+=@CXXDEBUG_FLAG@ CXXFLAGS+=@CXX_STRERROR_FLAG@ CXXFLAGS+=@LFS_FLAGS@ INCLUDES+=-I$(TOP_BUILDDIR) -I$(TOP_DIR) -I$(TOP_DIR)/thin-provisioning -LIBS:=-lstdc++ -laio -lexpat +LIBS:=-laio -lexpat + +ifeq ("@STATIC_CXX@", "yes") +CXXLIB+=-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -Wl,--as-needed +else +CXXLIB+=-lstdc++ +endif + INSTALL:=@INSTALL@ PREFIX:=@prefix@ BINDIR:=$(DESTDIR)$(PREFIX)/sbin @@ -150,7 +157,7 @@ lib/libpdata.a: $(OBJECTS) bin/pdata_tools: $(OBJECTS) @echo " [LD] $@" - $(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) + $(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(CXXLIB) #---------------------------------------------------------------- diff --git a/VERSION b/VERSION index a918a2a..ee6cdce 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.0 +0.6.1 diff --git a/configure.ac b/configure.ac index 5de0fe4..1161145 100644 --- a/configure.ac +++ b/configure.ac @@ -137,6 +137,14 @@ AC_ARG_ENABLE(testing, TESTING=$enableval, TESTING=no) AC_MSG_RESULT($TESTING) +################################################################################ +dnl -- Enable static libstdc++ +AC_MSG_CHECKING(whether to statically link libstdc++) +AC_ARG_ENABLE(static_cxx, + AC_HELP_STRING(--enable-static-cxx, [enable static link of libstdc++]), + STATIC_CXX=$enableval, STATIC_CXX=no) +AC_MSG_RESULT($STATIC_CXX) + ################################################################################ dnl -- Check for getopt AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if getopt_long is available.])) @@ -164,6 +172,7 @@ AC_SUBST(RELEASE_DATE) AC_SUBST(RELEASE_DATE) AC_SUBST(TESTING) AC_SUBST(THIN_PROVISIONING_TOOLS_VERSION) +AC_SUBST(STATIC_CXX) ################################################################################ dnl -- First and last lines should not contain files to generate in order to diff --git a/persistent-data/run_set.h b/persistent-data/run_set.h index b3098d6..68a5f46 100644 --- a/persistent-data/run_set.h +++ b/persistent-data/run_set.h @@ -100,8 +100,11 @@ namespace base { else { typename rset::const_iterator b = runs_.begin(); - // Some versions of gcc give a spurious warning here. - maybe last = b->end_; + // Some versions of gcc give a spurious + // warning here. So we initialize it to + // get round it. + maybe last(0); + last = b->end_; if (b->begin_) replacement.insert(run(maybe(), *(b->begin_))); diff --git a/thin-provisioning/thin_dump.cc b/thin-provisioning/thin_dump.cc index 4a1108b..171c263 100644 --- a/thin-provisioning/thin_dump.cc +++ b/thin-provisioning/thin_dump.cc @@ -87,17 +87,6 @@ namespace { } else return dump_(path, cout, format, flags); } - - void usage(ostream &out, string const &cmd) { - out << "Usage: " << cmd << " [options] {device|file}" << endl - << "Options:" << endl - << " {-h|--help}" << endl - << " {-f|--format} {xml|human_readable}" << endl - << " {-r|--repair}" << endl - << " {-m|--metadata-snap} [block#]" << endl - << " {-o }" << endl - << " {-V|--version}" << endl; - } } //---------------------------------------------------------------- diff --git a/thin-provisioning/thin_restore.cc b/thin-provisioning/thin_restore.cc index 39f9c54..b779b94 100644 --- a/thin-provisioning/thin_restore.cc +++ b/thin-provisioning/thin_restore.cc @@ -58,9 +58,6 @@ namespace { return 0; } - - void usage(ostream &out, string const &cmd) { - } } //----------------------------------------------------------------