public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* recent change broke gdb build
@ 2012-05-16 18:36 Tom Tromey
  2012-05-16 18:30 ` Tom Tromey
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2012-05-16 18:36 UTC (permalink / raw)
  To: Binutils Development

This change broke the gdb --enable-targets=all build:

2012-05-16  Daniel Richard G.  <skunk@iskunk.org>

	PR binutils/13558
	* bfd/aout-cris.c: Include sysdep.h before bfd.h.
	* bfd/aout-ns32k.c: Likewise.
	* bfd/aout-sparcle.c: Likewise.
[...]

The failure is:

In file included from ../../archer/gdb/../bfd/sysdep.h:81:0,
                 from ../../archer/gdb/../bfd/mach-o.h:26,
                 from ../../archer/gdb/solib-darwin.c:43:
../../archer/gdb/../include/fopen-same.h:15:0: error: "FOPEN_RB" redefined [-Werror]
../../archer/gdb/../include/fopen-bin.h:15:0: note: this is the location of the previous definition
../../archer/gdb/../include/fopen-same.h:16:0: error: "FOPEN_WB" redefined [-Werror]
../../archer/gdb/../include/fopen-bin.h:16:0: note: this is the location of the previous definition
../../archer/gdb/../include/fopen-same.h:17:0: error: "FOPEN_AB" redefined [-Werror]
../../archer/gdb/../include/fopen-bin.h:17:0: note: this is the location of the previous definition
../../archer/gdb/../include/fopen-same.h:18:0: error: "FOPEN_RUB" redefined [-Werror]
../../archer/gdb/../include/fopen-bin.h:18:0: note: this is the location of the previous definition
../../archer/gdb/../include/fopen-same.h:19:0: error: "FOPEN_WUB" redefined [-Werror]
../../archer/gdb/../include/fopen-bin.h:19:0: note: this is the location of the previous definition
../../archer/gdb/../include/fopen-same.h:20:0: error: "FOPEN_AUB" redefined [-Werror]
../../archer/gdb/../include/fopen-bin.h:20:0: note: this is the location of the previous definition
In file included from ../../archer/gdb/../bfd/mach-o.h:26:0,
                 from ../../archer/gdb/solib-darwin.c:43:
../../archer/gdb/../bfd/sysdep.h:186:0: error: "_" redefined [-Werror]
../../archer/gdb/common/gdb_locale.h:28:0: note: this is the location of the previous definition


I guess I don't understand how all this is supposed to work.

BFD supplies a config.h -- but the gdb build will always pick up gdb's
config.h, not BFD's.  So, either the conditionals will randomly be
wrong, or the gdb configure is supposed to do all the same checks and
arrive at the same results as the BFD configure.  But, the latter seems
like a pretty bad idea...

I tried a quick fix of renaming BFD's config.h to bfd_config.h, but that
breaks alloca-conf.h, which assumes that every project has a config.h.

I guess one idea would be to make BFD create *both* config.h and
bfd_config.h, and have it use bfd_config.h everywhere internally.

Or maybe this same treatment has to be applied to libiberty/config.h, so
alloca-config.h can work -- but at this point I figured that there must
just be something I'm missing.

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-18 14:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 18:36 recent change broke gdb build Tom Tromey
2012-05-16 18:30 ` Tom Tromey
2012-05-16 19:30   ` Pedro Alves
2012-05-16 19:37     ` Tom Tromey
2012-05-16 19:50     ` Pedro Alves
2012-05-18 11:30     ` [ping] " Pedro Alves
2012-05-18 14:32       ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).