Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
To: gdb-patches@cygnus.com
Subject: [gdb 19981224] Enable linking gdb against shared libbfd
Date: Tue, 29 Dec 1998 11:19:00 -0000	[thread overview]
Message-ID: <13961.11084.647489.224494@xayide.TechFak.Uni-Bielefeld.DE> (raw)

The following patch is a first shot at linking gdb 19981224 against a
shared libbfd (tried on IRIX 6.2).  It has a couple of shortcomings:

* libtool support was added manually to gdb/Makefile.in.  It currently
  lacks the libtool clean targets usually generated by automake's libtool
  support.  This will happen naturally once the gdb Makefile is converted
  to use automake.

* Using a shared libbfd isn't currently very useful since it doesn't
  support proper (in the libtool sense) interface versioning, without
  -release $(VERSION).  Since any release of binutils and gdb comes with
  it's own version of libbfd, there cannot happen any sharing, at least not
  between binutils and gdb.  Are there any plans to convert libbfd to
  proper versioning?  I doubt it is easy, if at all possible, given it's
  constant state of flux.

Mon Oct 26 20:19:27 1998  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* Makefile.in (LIBTOOL): Add.
	(CC_LD, install_only): Invoke $(LIBTOOL) here.
	(BFD, OPCODES): Reference libtool libraries to drag in shared
	versions if present.
	(INSTALLED_LIBS, CLIBS, CDEPS): Link -lopcodes first, it depends on
	-lbfd.

	* gdb/configure.in (AM_PROG_LIBTOOL): Invoke.

===================================================================
RCS file: gdb/RCS/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 gdb/Makefile.in
--- gdb/Makefile.in	1998/12/24 22:30:09	1.1
+++ gdb/Makefile.in	1998/12/29 18:55:46
@@ -54,6 +54,7 @@
 AR = @AR@
 AR_FLAGS = qv
 RANLIB = @RANLIB@
+LIBTOOL = @LIBTOOL@
 DLLTOOL = @DLLTOOL@
 WINDRES = @WINDRES@
 
@@ -80,7 +81,7 @@
 # Set this up with gcc if you have gnu ld and the loader will print out
 # line numbers for undefined references.
 #CC_LD=gcc -static
-CC_LD=$(CC)
+CC_LD=$(LIBTOOL) --mode=link $(CC)
 
 # Where is our "include" directory?  Typically $(srcdir)/../include.
 # This is essentially the header file directory for the library
@@ -97,7 +98,7 @@
 
 # Where is the BFD library?  Typically in ../bfd.
 BFD_DIR = ../bfd
-BFD = $(BFD_DIR)/libbfd.a
+BFD = $(BFD_DIR)/libbfd.la
 BFD_SRC = $(srcdir)/$(BFD_DIR)
 BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
 
@@ -121,7 +122,7 @@
 # in INCLUDE_DIR.
 # Where is the "-lopcodes" library, with (some of) the opcode tables and
 # disassemblers?
-OPCODES = ../opcodes/libopcodes.a
+OPCODES = ../opcodes/libopcodes.la
 # Where are the other opcode tables which only have header file
 # versions?
 OP_INCLUDE = $(INCLUDE_DIR)/opcode
@@ -183,19 +184,20 @@
 
 # Libraries and corresponding dependencies for compiling gdb.
 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
+# BFD comes after opcodes, since opcodes depends on it.
 # TERMCAP comes after readline, since readline depends on it.
 # MMALLOC comes after anything else that might want an allocation function.
 # LIBIBERTY appears twice on purpose.
 # If you have the Cygnus libraries installed,
 # you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS='
-INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \
+INSTALLED_LIBS=-lreadline -lopcodes -lbfd -liberty \
 	$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
 	-lmmalloc -lintl -liberty
-CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \
+CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) \
 	$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
 	$(MMALLOC) $(LIBIBERTY) $(WIN32LIBS)
-CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
-	$(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) @CONFIG_DEPS@
+CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(READLINE) \
+	$(OPCODES) $(BFD) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) @CONFIG_DEPS@
 
 ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
 ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
@@ -536,7 +538,7 @@
 		else \
 		  true ; \
 		fi ; \
-		$(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
+		$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
 		$(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1
 	@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 
 
===================================================================
RCS file: gdb/RCS/configure.in,v
retrieving revision 1.1
diff -u -r1.1 gdb/configure.in
--- gdb/configure.in	1998/12/24 22:22:14	1.1
+++ gdb/configure.in	1998/12/29 17:46:31
@@ -54,6 +54,7 @@
 changequote([,])dnl
 
 AC_PROG_INSTALL
+AM_PROG_LIBTOOL
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 AC_PROG_YACC

-----------------------------------------------------------------------------
Rainer Orth, Technical Faculty, University of Bielefeld

Internet: ro@TechFak.Uni-Bielefeld.DE



             reply	other threads:[~1998-12-29 11:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-29 11:19 Rainer Orth [this message]
1998-12-30 13:56 ` Stan Shebs
1999-01-07 17:23   ` H.J. Lu
1999-04-01  0:00     ` H.J. Lu
1999-04-01  0:00     ` Rainer Orth
1999-01-08 15:48       ` Rainer Orth
1999-04-01  0:00   ` Ian Lance Taylor
1999-01-03 12:19     ` Ian Lance Taylor
1999-02-20 17:05     ` Jim Blandy
1999-02-21 17:28       ` Ian Lance Taylor
1999-04-01  0:00         ` Ian Lance Taylor
1999-04-01  0:00       ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13961.11084.647489.224494@xayide.TechFak.Uni-Bielefeld.DE \
    --to=ro@techfak.uni-bielefeld.de \
    --cc=gdb-patches@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox