[v2,6/7] configure: Add --disable-demangler
Commit Message
__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 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Comments
Hi Ilya,
On Wed, 2023-02-08 at 20:52 +0100, Ilya Leoshkevich wrote:
> __cxa_demangle is normally implemented in the C++ runtime library,
> instrumenting which for MSan is a hassle. Add a knob for disbling it.
Thanks for the fixes.
Pushed,
Mark
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> configure.ac | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 7dc9be63..62a4c8a7 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -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],
@@ -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],