This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: build error for mn10300-elf sim with your recent commit


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]