* bfd version
@ 2002-10-14 5:04 Alan Modra
2002-10-14 6:39 ` H. J. Lu
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2002-10-14 5:04 UTC (permalink / raw)
To: binutils
bfd version and date strings are currently created by some black magic
in bfd/configure and find their way into the build bfd/bfd.h. This
scheme unfortunately doesn't update the version unless you re-
configure (or perhaps fortunately, as touching bfd.h causes many files
to be recompiled). So I've moved the version macros to version.h,
and added some machinery to create a build copy.
bfd/ChangeLog
* Makefile.am: Run "make dep-am".
(BFD_H_FILES): Remove version.h.
* bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
* version.h: ..to here.
* configure.in (bfd_version_date): Remove.
(AC_OUTPUT): Make bfdver.h from version.h.
* bfd.c: #include "bfdver.h".
* vms-hdr.c: Likewise.
* Makefile.in: Regenerate.
* bfd-in2.h: Regenerate.
* configure: Regenerate.
* po/SRC-POTFILES.in: Regenerate.
bfd/doc/ChangeLog
* Makefile.in: Regenerate.
binutils/ChangeLog
* Makefile.am: Run "make dep-am".
* objdump.c: #include "bfdver.h".
* version.c: Likewise.
* Makefile.in: Regenerate.
* config.in: Regenerate.
* configure: Regenerate.
* po/POTFILES.in: Regenerate.
gas/ChangeLog
* Makefile.am: Run "make dep-am".
(CPU_OBJ_VALID): sh64 coff is invalid.
* as.c: #include "bfdver.h".
* Makefile.in: Regenerate.
* config.in: Regenerate.
ld/ChangeLog
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
* ldver.c: #include "bfdver.h".
Applying mainline.
Index: bfd/Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.am,v
retrieving revision 1.104
diff -u -p -r1.104 Makefile.am
--- bfd/Makefile.am 11 Oct 2002 13:53:33 -0000 1.104
+++ bfd/Makefile.am 14 Oct 2002 06:04:37 -0000
@@ -810,7 +810,7 @@ stmp-bfd-h: bfd-in3.h
touch stmp-bfd-h
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
- reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
+ reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
BFD64_H_FILES = archive64.c
LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
@@ -867,7 +867,7 @@ config.status: $(srcdir)/configure $(src
archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/aout/ranlib.h $(INCDIR)/safe-ctype.h
archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
-bfd.lo: bfd.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+bfd.lo: bfd.c bfdver.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
@@ -904,7 +904,7 @@ merge.lo: merge.c $(INCDIR)/filenames.h
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
-simple.lo: simple.c $(INCDIR)/filenames.h
+simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
@@ -1503,8 +1503,8 @@ vms.lo: vms.c $(INCDIR)/filenames.h $(IN
vms.h
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
-vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/safe-ctype.h vms.h
+vms-hdr.lo: vms-hdr.c bfdver.h $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h vms.h
vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
Index: bfd/bfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in.h,v
retrieving revision 1.51
diff -u -p -r1.51 bfd-in.h
--- bfd/bfd-in.h 18 Sep 2002 02:39:42 -0000 1.51
+++ bfd/bfd-in.h 14 Oct 2002 06:04:40 -0000
@@ -41,10 +41,6 @@ extern "C" {
#endif
#endif
-#define BFD_VERSION @bfd_version@
-#define BFD_VERSION_DATE @bfd_version_date@
-#define BFD_VERSION_STRING @bfd_version_string@
-
/* The word size used by BFD on the host. This may be 64 with a 32
bit target if the host is 64 bit, or if other 64 bit targets have
been selected with --enable-targets, or if --enable-64-bit-bfd. */
Index: bfd/bfd.c
===================================================================
RCS file: /cvs/src/src/bfd/bfd.c,v
retrieving revision 1.37
diff -u -p -r1.37 bfd.c
--- bfd/bfd.c 18 Sep 2002 02:39:43 -0000 1.37
+++ bfd/bfd.c 14 Oct 2002 06:04:44 -0000
@@ -196,6 +196,7 @@ CODE_FRAGMENT
*/
#include "bfd.h"
+#include "bfdver.h"
#include "sysdep.h"
#ifdef ANSI_PROTOTYPES
Index: bfd/configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.115
diff -u -p -r1.115 configure.in
--- bfd/configure.in 9 Oct 2002 19:03:57 -0000 1.115
+++ bfd/configure.in 14 Oct 2002 06:04:50 -0000
@@ -16,17 +16,11 @@ bfd_version=`echo "${VERSION}" | sed -e
changequote([,])dnl
bfd_version_string="\"${VERSION}\""
-bfd_version_date=`sed -e 's/.*DATE //' < ${srcdir}/version.h`
if test x${is_release} = x; then
-dnl Sad, but we can't use XSTRING here to pick up the date from version.h
-dnl because traditional C doesn't allow it.
+ bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
bfd_version_string="\"${VERSION} ${bfd_version_date}\""
fi
-dnl Since we need to edit bfd-in3.h to get the date for bfd_version_string,
-dnl we may as well substitute for bfd_version_date too. That way we don't
-dnl need to #include version.h
AC_SUBST(bfd_version)
-AC_SUBST(bfd_version_date)
AC_SUBST(bfd_version_string)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
@@ -884,6 +878,6 @@ case ${want_mmap}+${ac_cv_func_mmap_fixe
esac
rm -f doc/config.status
-AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in,
+AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h bfdver.h:version.h po/Makefile.in:po/Make-in,
[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile])
Index: bfd/version.h
===================================================================
RCS file: /cvs/src/src/bfd/version.h,v
retrieving revision 1.360
diff -u -p -r1.360 version.h
--- bfd/version.h 14 Oct 2002 00:00:05 -0000 1.360
+++ bfd/version.h 14 Oct 2002 06:04:51 -0000
@@ -1 +1,3 @@
#define BFD_VERSION_DATE 20021014
+#define BFD_VERSION @bfd_version@
+#define BFD_VERSION_STRING @bfd_version_string@
Index: bfd/vms-hdr.c
===================================================================
RCS file: /cvs/src/src/bfd/vms-hdr.c,v
retrieving revision 1.10
diff -u -p -r1.10 vms-hdr.c
--- bfd/vms-hdr.c 2 Oct 2001 05:58:41 -0000 1.10
+++ bfd/vms-hdr.c 14 Oct 2002 06:04:51 -0000
@@ -25,6 +25,7 @@ along with this program; if not, write t
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
+#include "bfdver.h"
#include "sysdep.h"
#include "bfdlink.h"
#include "safe-ctype.h"
Index: binutils/Makefile.am
===================================================================
RCS file: /cvs/src/src/binutils/Makefile.am,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile.am
--- binutils/Makefile.am 17 Sep 2002 07:09:45 -0000 1.40
+++ binutils/Makefile.am 14 Oct 2002 04:07:16 -0000
@@ -441,10 +441,11 @@ objcopy.o: objcopy.c ../bfd/bfd.h $(INCD
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
budbg.h $(INCDIR)/filenames.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h budemang.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/progress.h \
+ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ budemang.h $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h
prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
@@ -517,8 +518,8 @@ sysdump.o: sysdump.c ../bfd/bfd.h $(INCD
$(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h \
sysroff.h sysroff.c
version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
+ $(INCDIR)/symcat.h ../bfd/bfdver.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
windres.o: windres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.58
diff -u -p -r1.58 objdump.c
--- binutils/objdump.c 28 Aug 2002 12:32:06 -0000 1.58
+++ binutils/objdump.c 14 Oct 2002 04:07:24 -0000
@@ -20,6 +20,7 @@
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
+#include "bfdver.h"
#include "progress.h"
#include "bucomm.h"
#include "budemang.h"
Index: binutils/version.c
===================================================================
RCS file: /cvs/src/src/binutils/version.c,v
retrieving revision 1.6
diff -u -p -r1.6 version.c
--- binutils/version.c 18 Jan 2002 11:28:42 -0000 1.6
+++ binutils/version.c 14 Oct 2002 04:07:24 -0000
@@ -20,6 +20,7 @@ Foundation, 59 Temple Place - Suite 330,
#include <stdio.h>
#include "bfd.h"
+#include "bfdver.h"
#include "bucomm.h"
/* Print the version number and copyright information, and exit. This
Index: gas/Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/Makefile.am,v
retrieving revision 1.65
diff -u -p -r1.65 Makefile.am
--- gas/Makefile.am 21 Sep 2002 10:39:16 -0000 1.65
+++ gas/Makefile.am 14 Oct 2002 11:30:55 -0000
@@ -119,7 +119,7 @@ CPU_OBJ_VALID = \
esac ;; \
coff) valid=yes; \
case $$c in \
- cris | i860 | mmix) \
+ cris | i860 | mmix | sh64) \
valid= ;; \
esac ;; \
ecoff) \
@@ -2337,7 +2337,7 @@ BMKDEP = #DO NOT PUT ANYTHING BETWEEN TH
#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
app.o: app.c $(INCDIR)/symcat.h
as.o: as.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
- output-file.h sb.h macro.h dwarf2dbg.h
+ output-file.h sb.h macro.h dwarf2dbg.h ../bfd/bfdver.h
atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h
bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
Index: gas/as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.39
diff -u -p -r1.39 as.c
--- gas/as.c 8 Jun 2002 07:37:14 -0000 1.39
+++ gas/as.c 14 Oct 2002 04:07:31 -0000
@@ -43,6 +43,10 @@
#include "macro.h"
#include "dwarf2dbg.h"
+#ifdef BFD_ASSEMBLER
+#include "bfdver.h"
+#endif
+
#ifdef HAVE_ITBL_CPU
#include "itbl-ops.h"
#else
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.113
diff -u -p -r1.113 Makefile.am
--- ld/Makefile.am 9 Oct 2002 19:09:59 -0000 1.113
+++ ld/Makefile.am 14 Oct 2002 04:07:42 -0000
@@ -1406,9 +1406,9 @@ ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR
ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h \
ldfile.h
ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h $(INCDIR)/bin-bugs.h ldver.h ldexp.h ldlang.h \
- ldfile.h ldemul.h ldmain.h
+ $(INCDIR)/symcat.h ../bfd/bfdver.h sysdep.h config.h \
+ $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h ldver.h \
+ ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h
ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
$(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h \
Index: ld/ldver.c
===================================================================
RCS file: /cvs/src/src/ld/ldver.c,v
retrieving revision 1.6
diff -u -p -r1.6 ldver.c
--- ld/ldver.c 18 Jan 2002 11:28:39 -0000 1.6
+++ ld/ldver.c 14 Oct 2002 04:07:44 -0000
@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suit
#include <stdio.h>
#include "bfd.h"
+#include "bfdver.h"
#include "sysdep.h"
#include "ld.h"
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bfd version
2002-10-14 5:04 bfd version Alan Modra
@ 2002-10-14 6:39 ` H. J. Lu
0 siblings, 0 replies; 2+ messages in thread
From: H. J. Lu @ 2002-10-14 6:39 UTC (permalink / raw)
To: binutils
On Mon, Oct 14, 2002 at 09:34:14PM +0930, Alan Modra wrote:
> bfd version and date strings are currently created by some black magic
> in bfd/configure and find their way into the build bfd/bfd.h. This
> scheme unfortunately doesn't update the version unless you re-
> configure (or perhaps fortunately, as touching bfd.h causes many files
> to be recompiled). So I've moved the version macros to version.h,
> and added some machinery to create a build copy.
>
Thanks. I was wondering why I couldn't duplicate the ld failure
unless I did a configure.
H.J.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-14 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-14 5:04 bfd version Alan Modra
2002-10-14 6:39 ` H. J. Lu
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).