This is the mail archive of the
mailing list for the binutils project.
Re: recent change broke gdb build
On 05/16/2012 06:47 PM, Tom Tromey wrote:
> Tom> I tried a quick fix of renaming BFD's config.h to bfd_config.h, but that
> Tom> breaks alloca-conf.h, which assumes that every project has a config.h.
> Here's a patch that works for me.
> This is a bit of a frankenstein patch since I did a bit in a gdb git
> repo and another in the binutils git repo.
> I haven't checked the GCC tree for uses of alloca-conf.h.
> A couple of other minor hacks:
> BFD now exports the _ define via sysdeps.h.
The issue is that bfd/mach-o.h now includes sysdeps.h, and GDB wants
to include mach-o.h. (It's not bfd.h that includes sysdeps.h.)
I think bfd should not include sysdeps.h (of config.h) in headers
that might be used outside bfd. Instead, the inclusion should be moved
to bfd's own .c files. Looking at all the bfd files that include
macho.h, they're all already including sysdep.h:
So reverting the sysdep.h inclusion from mach-o.h is enough to
fix this. Patch below.
> I changed gdb/defs.h to follow BFD's logic for including fopen-*.h.
> I don't think it is too good to depend on some other package's configury
> like this.
The usual way to do that is to share an .m4 file.
2012-05-16 Pedro Alves <email@example.com>
* mach-o.h: Don't include sysdep.h.
bfd/mach-o.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/bfd/mach-o.h b/bfd/mach-o.h
index 67ee43d..7f54961 100644
@@ -23,7 +23,6 @@