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 Friday 15 June 2012 17:14:36 Pedro Alves wrote:
> $ 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.

i'd wager that it's more of a copy & paste error between seems.  one of the 
really old ones had an interp.c that included sysdep.h, and when someone 
started a new port, they copied an existing one.  the local sysdep.h wasn't 
needed, but the build still worked, so no one looked further.  the sim code 
base isn't exactly a shining glory of how things should be done :).

i vote for deleting all sysdep.h inclusions where the port doesn't have a 
local sysdep.h.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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