From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by sourceware.org (Postfix) with ESMTPS id 501CF383508B for ; Wed, 16 Dec 2020 17:07:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 501CF383508B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nathanmsidwell@gmail.com Received: by mail-qk1-x72e.google.com with SMTP id c7so23261033qke.1 for ; Wed, 16 Dec 2020 09:07:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5gYlh4rVqIvB1EJhYv0LHxiw672n7YTAzrTJuhA+qPU=; b=J1sJ08OYEoYkyKwQCSWRTTygTiiRaqnL2doRNa1kXEcR91LxW7sNyqs1NmXnfibDIM +P2SywZiOsoYTPUWdcQQGRFY/I5vEbolgLydfh3KEmuiQKNTWKupFzlt98OtbGNUq5oZ ITBWBdD4nhXwXhNw9n+ozAKzZk1xvINDCf58xt2XGDCwqWMoc5n5tMgT+bm5HPdy8MXN vhBT8pRNb+lL4hgZCZ+Jx2mtYxzpihV4VSMM7Ovajt3jbp1wYDITGmAOgPc+ZYdnuLtC F+0LRacrylAVZ5k5wMoFIww2qTtGqED7+v/oFGfYtXM0XCC1jhtoXMBwgmh6rzYuXGJw imQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5gYlh4rVqIvB1EJhYv0LHxiw672n7YTAzrTJuhA+qPU=; b=ISYIS4VdFJb1b9bqR4klm6KzLlJSDuln6oDllassq0k8H9nPolAwAYrXNVPmdYSnLq BvRbAn21/AeXK6Xee1rOw6YXmsZK1aSGY1mXKB0K+ehSyH/QJ7YyWM4OmFk3BLkTJOKt DgN+YI0lNxuR1DXVh7q5iwOi42AeFqXmxKfpsnuLSa0YHtCfvbVd0fA0BZWlU+8NN8FZ EyDMpq4lfIRhMiXll3J0l5p32G17kGoUjeFIAnIg7Tq5oV7DeCA/C3vDrMqSqAce7mr5 yFtM4vj2g0zHcuau3psjr21lvsXwhO/0j9nhkEGSgc3pO9u7ySdAiinVkw+UmX+scxE9 aLLA== X-Gm-Message-State: AOAM530O/lz691Nz3W/qmy4qntlMz801uMi1pR7p8QRjJYuKIt93CND7 vPc3iMVXlPvtGNox9+58q24= X-Google-Smtp-Source: ABdhPJzwFlFig4NE3K0d2c408yYfHkodBNt41DjHO2IyJslPEwPpgGCi0FWs0nwLp09kEe+DAVf1OA== X-Received: by 2002:a37:bd01:: with SMTP id n1mr26618544qkf.469.1608138458496; Wed, 16 Dec 2020 09:07:38 -0800 (PST) Received: from ?IPv6:2620:10d:c0a8:1102:58ca:9b62:2bcb:bb64? ([2620:10d:c091:480::1:a32c]) by smtp.googlemail.com with ESMTPSA id y10sm1470846qkb.115.2020.12.16.09.07.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Dec 2020 09:07:37 -0800 (PST) Sender: Nathan Sidwell Subject: Re: libcody: fix --enable-checking=... [PR 98311] To: Jakub Jelinek Cc: GCC Patches References: <95f51965-abd5-20f7-f118-981f7f834f49@acm.org> <20201216154050.GE3788@tucnak> From: Nathan Sidwell Message-ID: <54eefa3d-c658-a0b5-e533-cc9a55048bf9@acm.org> Date: Wed, 16 Dec 2020 12:07:35 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20201216154050.GE3788@tucnak> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2020 17:07:44 -0000 On 12/16/20 10:40 AM, Jakub Jelinek wrote: > On Wed, Dec 16, 2020 at 09:22:49AM -0500, Nathan Sidwell wrote: >> Thanks Jakub for pointing at libcpp. >> >> The -enable-checking configure code in libcody didn't play well with >> us. This just uses libcpp's configurey for that piece. >> >> libcody/ >> * configure.ac: Use libcpp's enable-checking code. >> * configure: Rebuilt. >> >> pushing to trunk > > This doesn't set is_release anywhere, which means when --enable-checking* > or --disable-checking isn't specified, it always treats it as > --enable-checking=yes, while the normal gcc behavior is treat only trunk > as --enable-checking=yes and treat release branches as > --enable-checking=release by default. > > On the other side, nothing uses those ac_assert_checking and > ac_valgrind_checking variables, so it is a waste to compute those. > > Is this ok if it passes testing? yes. hehe, I checked that -enable-checking=set,of,options worked :) > 2020-12-16 Jakub Jelinek > > * configure.ac: Compute is_release. > (NMS_ENABLE_CHECKING): Simplify but not computing ac_assert_checking > and ac_valgrind_checking the code doesn't use. > * configure: Regenerated. > > --- libcody/configure.ac.jj 2020-12-16 16:14:49.468351790 +0100 > +++ libcody/configure.ac 2020-12-16 16:23:57.630214135 +0100 > @@ -23,6 +23,14 @@ NMS_TOOL_DIRS > NMS_LINK_OPT([-Wl,--no-undefined]) > NMS_CONFIG_FILES([gdbinit dox.cfg]) > > +# Enable expensive internal checks > +is_release= > +if test -d $srcdir/../gcc \ > + && test -f $srcdir/../gcc/DEV-PHASE \ > + && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then > + is_release=yes > +fi > + > NMS_BUGURL > dnl NMS_ENABLE_CHECKING > dnl cloned from ../libcpp/configure.ac > @@ -44,13 +52,8 @@ for check in release $ac_checking_flags > do > case $check in > # these set all the flags to specific states > - yes|all) ac_checking=1 ; ac_assert_checking=1 ; ac_valgrind_checking= ;; > - no|none) ac_checking= ; ac_assert_checking= ; ac_valgrind_checking= ;; > - release) ac_checking= ; ac_assert_checking=1 ; ac_valgrind_checking= ;; > - # these enable particular checks > - assert) ac_assert_checking=1 ;; > - misc) ac_checking=1 ;; > - valgrind) ac_valgrind_checking=1 ;; > + yes|all|misc) ac_checking=1 ;; > + no|none|release) ac_checking= ;; > # accept > *) ;; > esac > --- libcody/configure.jj 2020-12-16 16:14:49.459351891 +0100 > +++ libcody/configure 2020-12-16 16:29:28.204514512 +0100 > @@ -2686,6 +2686,14 @@ configure_args=$ac_configure_args > > > > +# Enable expensive internal checks > +is_release= > +if test -d $srcdir/../gcc \ > + && test -f $srcdir/../gcc/DEV-PHASE \ > + && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then > + is_release=yes > +fi > + > { $as_echo "$as_me:${as_lineno-$LINENO}: checking bugurl" >&5 > $as_echo_n "checking bugurl... " >&6; } > > @@ -2728,13 +2736,8 @@ for check in release $ac_checking_flags > do > case $check in > # these set all the flags to specific states > - yes|all) ac_checking=1 ; ac_assert_checking=1 ; ac_valgrind_checking= ;; > - no|none) ac_checking= ; ac_assert_checking= ; ac_valgrind_checking= ;; > - release) ac_checking= ; ac_assert_checking=1 ; ac_valgrind_checking= ;; > - # these enable particular checks > - assert) ac_assert_checking=1 ;; > - misc) ac_checking=1 ;; > - valgrind) ac_valgrind_checking=1 ;; > + yes|all|misc) ac_checking=1 ;; > + no|none|release) ac_checking= ;; > # accept > *) ;; > esac > > > Jakub > -- Nathan Sidwell