From: Jakub Jelinek <jakub@redhat.com>
To: Nathan Sidwell <nathan@acm.org>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: libcody: fix --enable-checking=... [PR 98311]
Date: Wed, 16 Dec 2020 16:40:50 +0100 [thread overview]
Message-ID: <20201216154050.GE3788@tucnak> (raw)
In-Reply-To: <95f51965-abd5-20f7-f118-981f7f834f49@acm.org>
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?
2020-12-16 Jakub Jelinek <jakub@redhat.com>
* 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
next prev parent reply other threads:[~2020-12-16 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 14:22 Nathan Sidwell
2020-12-16 15:40 ` Jakub Jelinek [this message]
2020-12-16 17:07 ` Nathan Sidwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201216154050.GE3788@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nathan@acm.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).