This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

recent change broke gdb build


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


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