]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
configure: Add --disable-demangler
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 8 Feb 2023 19:52:25 +0000 (20:52 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 9 Feb 2023 13:30:21 +0000 (14:30 +0100)
__cxa_demangle is normally implemented in the C++ runtime library,
instrumenting which for MSan is a hassle. Add a knob for disbling it.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
configure.ac

index 7dc9be63a1e8d71d92699ff9b261a9285cfe18eb..62a4c8a7407085204a3a0e0fe979270054c8bba7 100644 (file)
@@ -466,11 +466,17 @@ CFLAGS="$CFLAGS -D_GNU_SOURCE"
 AC_FUNC_STRERROR_R()
 CFLAGS="$old_CFLAGS"
 
+AC_ARG_ENABLE([demangler],
+AS_HELP_STRING([--disable-demangler],
+              [Disable libstdc++ demangle support]),
+              [], [enable_demangler=yes])
+AS_IF([test "x$enable_demangler" == xyes],
 AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl
 AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])])
 AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes")
 AS_IF([test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes"],
-      [enable_demangler=yes],[enable_demangler=no])
+      [enable_demangler=yes],[enable_demangler=no]),
+AM_CONDITIONAL(DEMANGLE, false))
 
 AC_ARG_ENABLE([textrelcheck],
 AS_HELP_STRING([--disable-textrelcheck],