This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problems with using libtool dependencies in opcodes
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 7 Jan 2004 13:40:31 -0500
- Subject: Re: Problems with using libtool dependencies in opcodes
- References: <20031222182104.GA9036@nevyn.them.org>
I've applied this patch.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-01-07 Daniel Jacobowitz <drow@mvista.com>
* Makefile.am (libopcodes_la_DEPENDENCIES)
(libopcodes_la_LIBADD): Revert 2003-05-17 change. Add explanatory
comment about the problem.
* Makefile.in: Regenerate.
Index: Makefile.am
===================================================================
RCS file: /cvs/src/src/opcodes/Makefile.am,v
retrieving revision 1.72
diff -u -p -r1.72 Makefile.am
--- Makefile.am 2 Dec 2003 08:14:34 -0000 1.72
+++ Makefile.am 7 Jan 2004 18:34:11 -0000
@@ -283,8 +283,13 @@ disassemble.lo: disassemble.c $(INCDIR)/
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $(srcdir)/disassemble.c
libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
-libopcodes_la_DEPENDENCIES = $(OFILES) ../bfd/libbfd.la
-libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ ../bfd/libbfd.la
+# It's desirable to list ../bfd/libbfd.la in DEPENDENCIES and LIBADD.
+# Unfortunately this causes libtool to add -L$(libdir), referring to the
+# planned install directory of libbfd. This can cause us to pick up an
+# old version of libbfd, or to pick up libbfd for the wrong architecture
+# if host != build.
+libopcodes_la_DEPENDENCIES = $(OFILES)
+libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# libtool will build .libs/libopcodes.a. We create libopcodes.a in