From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14061 invoked by alias); 14 Oct 2004 17:14:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14052 invoked from network); 14 Oct 2004 17:14:52 -0000 Received: from unknown (HELO walton.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 14 Oct 2004 17:14:52 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by walton.sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id i9EHEg4C030897; Thu, 14 Oct 2004 19:14:42 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id i9EHEfpH000420; Thu, 14 Oct 2004 19:14:41 +0200 (CEST) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id i9EHEeBE000417; Thu, 14 Oct 2004 19:14:40 +0200 (CEST) Date: Thu, 14 Oct 2004 17:14:00 -0000 Message-Id: <200410141714.i9EHEeBE000417@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: cagney@gnu.org, gdb-patches@sources.redhat.com In-reply-to: <20041013135405.GA27778@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 13 Oct 2004 09:54:05 -0400) Subject: Re: [patch/rfc] Build inf-ptrace.o when ptrace available References: <415DC09D.2070407@gnu.org> <200410012154.i91Ls6lE001359@elgar.sibelius.xs4all.nl> <41615D1E.8070007@gnu.org> <20041004143416.GA6653@nevyn.them.org> <416179DE.70401@gnu.org> <20041004163533.GA12898@nevyn.them.org> <416323A7.2010201@gnu.org> <20041005225914.GA28588@nevyn.them.org> <416AC1AC.6050207@gnu.org> <20041013135405.GA27778@nevyn.them.org> X-SW-Source: 2004-10/txt/msg00249.txt.bz2 Date: Wed, 13 Oct 2004 09:54:05 -0400 From: Daniel Jacobowitz 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.