summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--debian/changelog3
-rw-r--r--dselect/cxx-support.cc11
3 files changed, 26 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5000b6172..248d0a66e 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 7c5edfb0f..e3535da27 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 d850ed591..57c9d5cea 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