Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: introduce common.m4
Date: Wed, 24 Apr 2013 23:16:00 -0000	[thread overview]
Message-ID: <51782A71.7030305@redhat.com> (raw)
In-Reply-To: <871u9zomzd.fsf@fleche.redhat.com>

On 04/24/2013 06:30 PM, Tom Tromey wrote:
> It has bothered me for a while that files in common/ use macros
> defined via autoconf checks, but rely on each configure.ac doing the
> proper checks independently.
> 
> This patch introduces common/common.m4 which consolidates the checks
> assumed by code in common.
> 
> The rule I propose is that if something is needed or used by common,
> it should be checked for by common.m4; but that code outside this
> directory also be free to use these results.  This means that removing
> checks from common.m4 must first be preceded by looking at uses in gdb
> and gdbserver.  I think this is pretty easy to do -- easier than what
> we are doing now -- and I have documented the requirement.

What's the advantage of doing it this way?  Caching?  Doesn't autoconf
use the cached value if there are multiple AC_CHECK_FOOs for the same
thing?  Not super sure I like this over keeping each directory aware
of its dependencies, but I suppose I can go along.

> This process revealed a few things not checked for in gdbserver
> (nothing too crucial I think) and also that the decl check for getopt
> was dead.

Ah, an "also".  ;-)

> I wrote GDB_AC_COMMON by looking for HAVE_ symbols in common/*.[ch].
> I did not look for library dependencies, so it is possible that
> something is missing.  I think it is worthwhile to have this in place
> now, even if it is not perfect, because it gives us a place to make
> future improvements.

I definitely agree with the idea of a common common.m4 in common/. :-)

> gdb:
> 	* acinclude.m4: Include common.m4.
> 	* common/common.m4: New file.
> 	* configure, config.in: Rebuild.
> 	* configure: Move some checks to common.m4.  Use GDB_AC_COMMON.

s/configure/configure.ac/


> 
> gdbserver:
> 	* acinclude.m4: Include common.m4, codeset.m4.

codeset.m4?

> 	* configure, config.in: Rebuild.
> 	* configure: Move some checks to common.m4.  Use GDB_AC_COMMON.

s/configure/configure.ac/


> +  AC_CHECK_HEADERS(linux/perf_event.h locale.h memory.h signal.h dnl
> +                   string.h strings.h sys/resource.h sys/un.h sys/wait.h dnl
> +		   thread_db.h wait.h)

Something odd with indentation here.

Mechanically looks good to me.  I don't plan on
checking/cross-checking what was moved in detail.

-- 
Pedro Alves


  reply	other threads:[~2013-04-24 18:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 20:51 Tom Tromey
2013-04-24 23:16 ` Pedro Alves [this message]
2013-04-25  1:47   ` Tom Tromey
2013-04-25  2:45     ` Pedro Alves
2013-04-25  5:48       ` Tom Tromey
2013-04-26 21:01         ` Pedro Alves
2013-07-22 17:49           ` Tom Tromey
2013-07-26 15:34             ` Pedro Alves

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=51782A71.7030305@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /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