Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@gnu.org>
To: drow@false.org
Cc: cagney@gnu.org, gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Build inf-ptrace.o when ptrace available
Date: Thu, 14 Oct 2004 17:14:00 -0000	[thread overview]
Message-ID: <200410141714.i9EHEeBE000417@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20041013135405.GA27778@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 13 Oct 2004 09:54:05 -0400)

   Date: Wed, 13 Oct 2004 09:54:05 -0400
   From: Daniel Jacobowitz <drow@false.org>

   I wrote that my experience with automated builds suggested that a
   problem _would_ occur.  I don't have an example of this problem
   occuring, but I don't think we need one to understand why it is an
   unsound design principle.  The change would cause inf-ptrace to be
   built on more systems/configurations (where GDB wouldn't know how to
   use it), and could potentially cause it to be built on fewer systems
   (where GDB wouldn't work without it).  No win.

We should try to make things as robust as possible.  In many cases
autoconfiguring makes things more robust than hardcoding things based
on a host triplet.  In some cases this may not be the case though, and
I think inf-ptrace is such a case.

   > >>>If we used configure.tgt and:
   > >>>	switch "$target"
   > >>>	 *-*-linux* ) "objs=objs symfile-mem.c"
   > >>>	esac
   > >>>then all GNU/Linux systems will always and consistently include 
   > >>>symtab-mem.c.  We don't, they don't ...
   > >
   > >
   > >This is no harder than having a common linux.mh, as GCC has done for
   > >years (gcc/config/t-linux).  It's not a technical differece between
   > >configure-frobbing and makefile-fragmenting.

Configure-frobbing still gives you more flexibility since it's easier
to change things without having to touch multiple files.  With
makefile-fragmenting, we'd need to modify the configure script in many
cases anyway.  Moreover, configure-frobbing gives you the full
flexibility of the shell syntax.  In a configure.host file for example
I could write things as:

case $host in
  *-openbsd*)
    if test -f $srcdir/${cpu}obsd-nat.c; then
      OBJS += ${cpu}obsd-nat.o
    elif test -f $srcdir/${cpu}nbsd-nat.c; then
      OBJS += ${cpu}nbsd-nat.o
    fi
esac

This could potentially save us quite a substantial number of makefile
fragments.

However, makefile-fragmenting has benefits.  Configure-frobbing can do
variable substition in makefiles, but not much more.
Makefile-fragmenting can use the full makefile syntax.

I'm not sure yet what we need most.  But if our makefile fragments
only contain a list of object files, I'd certainly ditch them in
favour of configure-frobbing.


  reply	other threads:[~2004-10-14 17:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 20:40 Andrew Cagney
2004-10-01 21:54 ` Mark Kettenis
2004-10-04 14:24   ` Andrew Cagney
2004-10-04 14:34     ` Daniel Jacobowitz
2004-10-04 16:27       ` Andrew Cagney
2004-10-04 16:35         ` Daniel Jacobowitz
2004-10-05 22:44           ` Andrew Cagney
2004-10-05 22:59             ` Daniel Jacobowitz
2004-10-05 23:42               ` Andrew Cagney
2004-10-11 17:24               ` Andrew Cagney
2004-10-13 13:54                 ` Daniel Jacobowitz
2004-10-14 17:14                   ` Mark Kettenis [this message]
2004-10-04 17:20     ` Mark Kettenis
2004-10-04 17:51       ` Andrew Cagney
2004-10-04 18:23         ` Mark Kettenis
2004-10-03 14:50 ` Daniel Jacobowitz
2004-10-04 14:31   ` Andrew Cagney
2004-10-04 14:34     ` Daniel Jacobowitz
2004-10-04 16:18       ` Andrew Cagney

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=200410141714.i9EHEeBE000417@elgar.sibelius.xs4all.nl \
    --to=kettenis@gnu.org \
    --cc=cagney@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.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