From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 8B2893858D39 for ; Wed, 8 Feb 2023 18:14:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B2893858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from r6.localdomain (82-217-174-174.cable.dynamic.v4.ziggo.nl [82.217.174.174]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 8050030067CA; Wed, 8 Feb 2023 19:14:39 +0100 (CET) Received: by r6.localdomain (Postfix, from userid 1000) id 0C21F3402CC; Wed, 8 Feb 2023 19:14:38 +0100 (CET) Message-ID: <851b98fd0229e6d287e208a8816ee10b5d6488ad.camel@klomp.org> Subject: Re: [PATCH RFC 10/11] configure: Add --disable-demangle From: Mark Wielaard To: Ilya Leoshkevich , elfutils-devel@sourceware.org Date: Wed, 08 Feb 2023 19:14:37 +0100 In-Reply-To: <20230206222513.1773039-11-iii@linux.ibm.com> References: <20230206222513.1773039-1-iii@linux.ibm.com> <20230206222513.1773039-11-iii@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-3036.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Ilya, On Mon, 2023-02-06 at 23:25 +0100, Ilya Leoshkevich via Elfutils-devel wrote: > __cxa_demangle is normally implemented in the C++ runtime library, > instrumenting which for MSan is a hassle. Add a knob for disabling it. >=20 > Signed-off-by: Ilya Leoshkevich > --- > configure.ac | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > diff --git a/configure.ac b/configure.ac > index 7dc9be63..6a5c38af 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -466,11 +466,17 @@ CFLAGS=3D"$CFLAGS -D_GNU_SOURCE" > AC_FUNC_STRERROR_R() > CFLAGS=3D"$old_CFLAGS" > =20 > +AC_ARG_ENABLE([demangler], > +AS_HELP_STRING([--disable-demangle], > + [Disable libstdc++ demangle support])) Typo [--disable-demangler] (missing r). Also we want to enable demangler support by default if the enable option isn't given, so you need to add [], [enable_demangler=3Dyes] at the end. AC_ARG_ENABLE (feature, help-string, [action-if-given], [action-if-not- given]) So the action-if-not-given is to enable the feature. Note that otherwise the summary at the end will have nothing for: libstdc++ demangle support :=20 Should be either yes or no, even when --enable-demangler or --disable- demangler isn't given. Cheers, Mark > +AS_IF([test "x$enable_demangler" =3D=3D 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" =3D "x= yes") > AS_IF([test "x$ac_cv_lib_stdcpp___cxa_demangle" =3D "xyes"], > - [enable_demangler=3Dyes],[enable_demangler=3Dno]) > + [enable_demangler=3Dyes],[enable_demangler=3Dno]), > +AM_CONDITIONAL(DEMANGLE, false)) > =20 > AC_ARG_ENABLE([textrelcheck], > AS_HELP_STRING([--disable-textrelcheck],