[dpkg] 125/187: dselect: Implement local abi::__cxa_pure_virtual
Reiner Herrmann
reiner at reiner-h.de
Sun Nov 6 12:46:32 UTC 2016
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository dpkg.
commit ed6cbcf7a1706523580a91491adb9ecd55098f9c
Author: Guillem Jover <guillem at debian.org>
Date: Wed Sep 7 04:49:33 2016 +0200
dselect: Implement local abi::__cxa_pure_virtual
When using g++ if we provide our version of this function we can avoid
the dependency on either libstdc++ or libsup++.
---
configure.ac | 12 ++++++++++++
debian/changelog | 3 +++
dselect/cxx-support.cc | 11 +++++++++++
3 files changed, 26 insertions(+)
diff --git a/configure.ac b/configure.ac
index 5000b61..248d0a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,6 +109,12 @@ AC_CHECK_HEADERS([\
linux/fiemap.h \
])
+AS_IF([test "x$build_dselect" = "xyes"], [
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADERS([cxxabi.h])
+ AC_LANG_POP([C++])
+])
+
# Checks for typedefs, structures, and compiler characteristics.
AC_C_BIGENDIAN
AC_C_CONST
@@ -164,6 +170,12 @@ AC_CHECK_FUNCS([\
posix_fadvise \
])
+AS_IF([test "x$build_dselect" = "xyes"], [
+ AC_LANG_PUSH([C++])
+ AC_CHECK_FUNCS([__cxa_pure_virtual])
+ AC_LANG_POP([C++])
+])
+
DPKG_MMAP
# Checks for the build machinery.
diff --git a/debian/changelog b/debian/changelog
index 7c5edfb..e3535da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -42,6 +42,9 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
libdpkg. Regression introduced in dpkg 1.18.7. Closes: #842004
* Move C++ support code into its own file.
* Add replacement new and delete array operators to C++ support code.
+ * Implement local abi::__cxa_pure_virtual. When using g++ if we provide our
+ version of this function we can avoid the dependency on either libstdc++
+ or libsup++.
* Architecture support:
- Add support for AIX operating system.
* Portability:
diff --git a/dselect/cxx-support.cc b/dselect/cxx-support.cc
index d850ed5..57c9d5c 100644
--- a/dselect/cxx-support.cc
+++ b/dselect/cxx-support.cc
@@ -26,6 +26,9 @@
#include <assert.h>
#include <stdlib.h>
+#ifdef HAVE_CXXABI_H
+#include <cxxabi.h>
+#endif
#include <dpkg/dpkg.h>
@@ -74,3 +77,11 @@ operator delete[](void *a, size_t size) DPKG_ATTR_NOEXCEPT
{
free(a);
}
+
+#ifdef HAVE___CXA_PURE_VIRTUAL
+extern "C" void
+abi::__cxa_pure_virtual()
+{
+ internerr("pure virtual function called");
+}
+#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list