From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/gdbserver: switch to AC_CONFIG_MACRO_DIRS
Date: Fri, 18 Jun 2021 09:22:59 -0400 [thread overview]
Message-ID: <7e003119-2201-0a77-423e-129565455619@polymtl.ca> (raw)
In-Reply-To: <YMwjR8+SUF+vDJTW@vapier>
> oof, i agree, that smells like an aclocal bug. i'm not sure i'd call it benign
> when it's indistinguishable from actual missing macros. for example:
> $ echo AM_FOO >> configure.ac
> $ aclocal
> configure.ac:121: warning: macro 'AM_FOO' not found in library
> $ echo $?
> 0
The aclocal warning is indistinguishable between a valid and an invalid
macro. But if the macro is valid, it will successfully get replaced by
autoconf and we will get the expected result in the configure file.
That's why I called it benign.
If the macro doesn't exist (like AM_FOO), of course it won't get
replaced, and AM_FOO will appear literally in the configure file. But
then the configure file will just be obviously broken.
>
> i think autoconf might fail (i hope that's always the case), but it feels a
> bit wrong for it to be disconnected as such. and hopefully people always
> check the exit code of their tools ;).
>
>> I'd suggest still just doing the right thing and removing all the
>> ../config/* includes, and just ignore the warnings. I'll try to open an
>> automake bug or ask on the mailing list eventually.
>
> this seems to go against our -Werror approach to things. i also suspect
> it'll trip up devs who waste time trying to figure out why there's this
> warning (and surely it's their problem because no one else in the project
> would allow this to creep in), which means a snowball effect for people.
Hmm, right.
> so all things considered, i think the explicit include to silence the
> warning is the right trade-off. we can add some comments explaining
> why they're there so that at least doesn't keep tripping us up.
>
> how about at the top of acinclude.m4:
> dnl NB: When possible, try to avoid explicit includes of ../config/ files.
> dnl They're normally found by aclocal automatically and recorded in aclocal.m4.
> dnl However, some are kept here explicitly to silence harmless warnings from
> dnl aclocal when it finds AM_xxx macros via local search paths instead of
> dnl system search paths.
> -mike
That LGTM.
Simon
next prev parent reply other threads:[~2021-06-18 13:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-09 1:24 [PATCH] gdb: add ../config/pkg.m4 in acinclude.m4 Simon Marchi via Gdb-patches
2021-05-09 20:00 ` Mike Frysinger via Gdb-patches
2021-05-10 0:16 ` Simon Marchi via Gdb-patches
2021-05-10 1:14 ` Mike Frysinger via Gdb-patches
2021-05-10 1:32 ` Simon Marchi via Gdb-patches
2021-05-10 13:25 ` Tom Tromey
2021-05-10 22:36 ` Mike Frysinger via Gdb-patches
2021-06-15 5:44 ` [PATCH] gdb/gdbserver: switch to AC_CONFIG_MACRO_DIRS Mike Frysinger via Gdb-patches
2021-06-17 2:30 ` Simon Marchi via Gdb-patches
2021-06-17 4:21 ` Mike Frysinger via Gdb-patches
2021-06-17 14:43 ` Simon Marchi via Gdb-patches
2021-06-18 4:38 ` Mike Frysinger via Gdb-patches
2021-06-18 13:22 ` Simon Marchi via Gdb-patches [this message]
2021-06-23 9:38 ` Pedro Alves
2021-06-23 22:26 ` Mike Frysinger via Gdb-patches
2021-06-24 18:45 ` Pedro Alves
2021-06-18 14:03 ` [PATCH v2] " Mike Frysinger via Gdb-patches
2021-06-20 0:48 ` Simon Marchi via Gdb-patches
2021-06-20 2:10 ` Mike Frysinger via Gdb-patches
2021-06-20 2:17 ` Simon Marchi via Gdb-patches
2021-06-20 2:22 ` [PATCH v3] " Mike Frysinger via Gdb-patches
2021-06-20 2:46 ` Simon Marchi via Gdb-patches
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=7e003119-2201-0a77-423e-129565455619@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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