From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23208 invoked by alias); 17 Nov 2004 18:25:41 -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 22688 invoked from network); 17 Nov 2004 18:25:17 -0000 Received: from unknown (HELO krynn.se.axis.com) (193.13.178.10) by sourceware.org with SMTP; 17 Nov 2004 18:25:17 -0000 Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.83.5.18]) by krynn.se.axis.com (8.12.9/8.12.9/Debian-5local0.1) with ESMTP id iAHIPCAD001671; Wed, 17 Nov 2004 19:25:12 +0100 Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id iAHIPCdD017593; Wed, 17 Nov 2004 19:25:12 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id iAHIPCSZ017589; Wed, 17 Nov 2004 19:25:12 +0100 Date: Wed, 17 Nov 2004 18:25:00 -0000 Message-Id: <200411171825.iAHIPCSZ017589@ignucius.se.axis.com> From: Hans-Peter Nilsson To: rearnsha@gcc.gnu.org CC: hans-peter.nilsson@axis.com, gdb-patches@sources.redhat.com In-reply-to: <1100707579.22014.47.camel@pc960.cambridge.arm.com> (message from Richard Earnshaw on Wed, 17 Nov 2004 16:06:19 +0000) Subject: Re: ARM Simulator build broken X-SW-Source: 2004-11/txt/msg00359.txt.bz2 > From: Richard Earnshaw > Date: Wed, 17 Nov 2004 16:06:19 +0000 > On Wed, 2004-11-17 at 15:03, Richard Earnshaw wrote: > > On Tue, 2004-11-16 at 15:35, Hans-Peter Nilsson wrote: > > > BTW, you shouldn't have edited out sim-arange.c, a gcc -MM says > > > it's actually included from sim-basics.h (and from looking at > > > the code). For the same reason sim-assert.h should be in > > > sim_basics_headers. Maybe all files should use the > > > $(sim-assert_h) et al macros. > > > > The list of headers I used was the list directly in sim-basics.h. I > > only moved existing includes from sim_main_headers and then added > > further ones at the first level that were obviously missing. So if it's > > wrong now it was wrong before. Yes, it *was* wrong before. :-) Many more were missing. Less wrong with your patch. Anyway, you weren't that far off: I got the list from "gcc -MM" with the rest of the command-line from an arm-sim compilation of sim-load.c, but with the file a single '#include "sim-basics.h"'. Notable thing missing: sim-basics.h contains the specific lines #include "gdb/callback.h" #include "gdb/remote-sim.h" Supposedly they were added at some point but dependencies were for some reason or another not updated. It kind of makes the occurrences of $(remote_sim_h) and $(callback_h) in .o rules redundant... > > The best way to do all this is to define a series of macros > > sim-basics_h, sim-assert-h etc, and for each of these to list the macros > > that form the direct dependencies. Right, some are already there, but apparently unused in sim_main_headers for unknown reasons, while the similar hw-*_h macros are used in hw_main_h. > > But that's a fair bit of work... :-( ... and it needs active > > maintenance to keep it up to date. > > > > R. > > Attached is a revised version of the patch that implements this for > sim-*.h. Nice. > Really further work should be done so that the C files depend > on the correct headers rather than all depending on sim_main_headers. Along the lines of the dep-am rule in bfd/Makefile.am, perhaps. brgds, H-P