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]

[patch] to bfd: ranlib the libbfd.a in the build directory


Hi there,

There is a slight gotcha in the building of libbfd.a. It is built and installed
with libtool, which is fine for bfd itself, as well as for the other modules in
the Cygnus tree that link against it using libtool (binutils, gas, ld).
However, other modules in the Cygnus tree that don't use libtool (such as gdb)
link against libbfd.a in the bfd build directory, while bfd's libtool tucks it
away in .libs. There is currently a kludge in bfd's Makefile to copy it to the
build directory specifically to solve this problem. The problem is that it
forgets to ranlib the new copy, which makes it unusable to 4.3BSD's native ld.
The patch below fixes it.

-- 
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force

1351 VINE AVE APT 27		Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA	(home office)

E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP)

2001-02-08  Michael Sokolov  <msokolov@ivan.Harhan.ORG>

	* Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
	* Makefile.in: Regenerate.

Index: Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.am,v
retrieving revision 1.45
diff -p -r1.45 Makefile.am
*** Makefile.am	2001/02/07 01:58:26	1.45
--- Makefile.am	2001/02/08 19:43:02
*************** stamp-lib: libbfd.la
*** 534,539 ****
--- 534,540 ----
  	libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
  	if [ -f $$libtooldir/libbfd.a ]; then \
  	  cp $$libtooldir/libbfd.a libbfd.tmp; \
+ 	  $(RANLIB) libbfd.tmp; \
  	  $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \
  	else true; fi
  	touch stamp-lib

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