This is the mail archive of the binutils@sources.redhat.com 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]

RE: PATCH: Fix bfd.c (Re: Tracking down a build breakage)


Hi,

> But my bfd_sprintf_vma/bfd_fprintf_vma change does break any BFD
> which doesn't include elf.lo. It seems to me that we should only
> check bfd_target_elf_flavour when elf is configured in BFD. Here
> is a patch. Any comments?

This seemd to be a problem when I was trying to build gdb.

> 2001-08-11  H.J. Lu  <hjl@gnu.org>
> 
> 	* Makefile.am (BFD_DEFINES): New. Substituted by @bfd_defines@.
> 	(INCLUDES): Add $(BFD_DEFINES).
> 	* Makefile.in: Regenerated.
> 
> 	* configure.in (bfd_defines): Add -DHAVE_BFD_ELF if elf.lo
> 	is in $bfd_backend.
> 	(AC_SUBST(bfd_defines)): Added.
> 	* configure: Regenerated.
> 
> 	* bfd.c (bfd_sprintf_vma): Check ELF only if HAVE_BFD_ELF is
> 	defined.
> 	(bfd_fprintf_vma): Likewise.

Amazingly, after doing "cvs co binutils", I did not have to apply your
patch to successfully build h8300 target.  With your patch, the build
process got stuck as follows.  The command line looks just fine.  I
don't know why gcc makes such a complaint...

/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I/home/kazu/gnu/binutils/binutils-head/src/bfd -I. -D_GNU_SOURCE @bfd_defines@ -I. -I/home/kazu/gnu/binutils/binutils-head/src/bfd -I/home/kazu/gnu/binutils/binutils-head/src/bfd/../include  -I/home/kazu/gnu/binutils/binutils-head/src/bfd/../intl -I../intl   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /home/kazu/gnu/binutils/binutils-head/src/bfd/archive.c
gcc -DHAVE_CONFIG_H -I. -I/home/kazu/gnu/binutils/binutils-head/src/bfd -I. -D_GNU_SOURCE @bfd_defines@ -I. -I/home/kazu/gnu/binutils/binutils-head/src/bfd -I/home/kazu/gnu/binutils/binutils-head/src/bfd/../include -I/home/kazu/gnu/binutils/binutils-head/src/bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c /home/kazu/gnu/binutils/binutils-head/src/bfd/archive.c -o archive.o
gcc: cannot specify -o with -c or -S and multiple compilations
make[3]: *** [archive.lo] Error 1
make[3]: Leaving directory `/var/tmp/h8300-hms-binutils-head-0811-2/bfd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/h8300-hms-binutils-head-0811-2/bfd'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/var/tmp/h8300-hms-binutils-head-0811-2/bfd'
make: *** [all-bfd] Error 2
Command exited with non-zero status 2

Kazu Hirata


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