From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23872 invoked by alias); 15 Jun 2012 21:15:08 -0000 Received: (qmail 23864 invoked by uid 22791); 15 Jun 2012 21:15:08 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jun 2012 21:14:54 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5FLEcNJ012472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Jun 2012 17:14:38 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q5FLEbES013592; Fri, 15 Jun 2012 17:14:37 -0400 Message-ID: <4FDBA5BC.8030300@redhat.com> Date: Fri, 15 Jun 2012 21:15:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Joel Brobecker CC: Hans-Peter Nilsson , gdb-patches@sourceware.org Subject: Re: build error for mn10300-elf sim with your recent commit References: <201206151846.q5FIkL3Z026410@ignucius.se.axis.com> <20120615185559.GZ18729@adacore.com> <20120615191516.GA18729@adacore.com> <4FDB8F4C.8070404@redhat.com> <20120615195238.GB18729@adacore.com> In-Reply-To: <20120615195238.GB18729@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00532.txt.bz2 On 06/15/2012 08:52 PM, Joel Brobecker wrote: >> I'm confused. Nothing outside of bfd should be including bfd/sysdep.h. >> Is that what is happening? > > Yep. > > And for the record, I did try to compile without including sysdep.h, > and it built just fine. But I am assuming that there are some hosts > that this is going to break, and since I can't test the change on > every single hosts out there... Only one way to find out. :-) $ cd sim $ find . -name "*.[hc]" | xargs grep sysdep.h ./d10v/interp.c:#include "sysdep.h" ./cr16/interp.c:#include "sysdep.h" ./moxie/interp.c:#include "sysdep.h" ./mcore/interp.c:#include "sysdep.h" ./sh64/sh-desc.c:#include "sysdep.h" ./mn10300/interp.c:#include "sysdep.h" ./microblaze/interp.c:#include "sysdep.h" ./cris/traps.c:/* From ld/sysdep.h. */ ./cris/cris-desc.c:#include "sysdep.h" One's a comment. And, $ find . -name sysdep.h ./moxie/sysdep.h ./mcore/sysdep.h ./microblaze/sysdep.h So that leaves: ./d10v/interp.c:#include "sysdep.h" ./cr16/interp.c:#include "sysdep.h" ./sh64/sh-desc.c:#include "sysdep.h" ./mn10300/interp.c:#include "sysdep.h" ./cris/cris-desc.c:#include "sysdep.h" I don't see these ports really caring for hosts other than GNU/Linux and Windows. It is wrong to include bfd/sysdeps.h, practically as much as it is wrong to include bfd/config.h. bfd/sysdeps.h HAVE_FOOs depend on bfd's own autoconfigury, not the sim's. Consolidating all the commonality between all these sysdep.h files sound nice, though I'm not sure how much work that is. -- Pedro Alves