Thread View: gnu.gdb.bug
1 messages
1 total messages
Started by Dimitar Zhekov
Mon, 11 Mar 2002 08:09
gdb configured with --enable-shared --disable-static fails to link
Author: Dimitar Zhekov
Date: Mon, 11 Mar 2002 08:09
Date: Mon, 11 Mar 2002 08:09
110 lines
5130 bytes
5130 bytes
The version of GDB: 5.1.1 The type of machine you are using: i686-pc-linux-gnu The operating system name and version number: rock-linux-1.5.12 What compiler (and its version) was used to compile GDB: gcc-2.95.3 How gdb was configured: ./configure --enable-shared --disable-static What compiler (and its version) was used to compile the example program: N/A When gdb is configured with --enable-shared --disable-static, only libbfd.so and libopcodes.so are created, but not .a, yet the link is still attempted against the (unexisting) libbfd.a and libopcodes.a, which fails, of course. This can probably be easily fixed, as demonstrated by the following example: <cut here> diff -rNC3 gdb-5.1.1/gdb/Makefile.in gdb/gdb/Makefile.in *** gdb-5.1.1/gdb/Makefile.in Sun Nov 18 07:08:36 2001 --- gdb/gdb/Makefile.in Sat Mar 9 16:38:49 2002 *************** *** 59,64 **** --- 59,65 ---- AR_FLAGS = qv RANLIB = @RANLIB@ DLLTOOL = @DLLTOOL@ + LIBTOOL = $(SHELL) $(top_builddir)/../bfd/libtool WINDRES = @WINDRES@ MIG = @MIG@ *************** *** 92,97 **** --- 93,99 ---- # line numbers for undefined references. #CC_LD=gcc -static CC_LD=$(CC) + LINK = $(LIBTOOL) --mode=link $(CC_LD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ # Where is our "include" directory? Typically $(srcdir)/../include. # This is essentially the header file directory for the library *************** *** 115,121 **** # Where is the BFD library? Typically in ../bfd. BFD_DIR = ../bfd ! BFD = $(BFD_DIR)/libbfd.a BFD_SRC = $(srcdir)/$(BFD_DIR) BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) --- 117,123 ---- # Where is the BFD library? Typically in ../bfd. BFD_DIR = ../bfd ! BFD = $(BFD_DIR)/libbfd.la BFD_SRC = $(srcdir)/$(BFD_DIR) BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) *************** *** 212,218 **** # in INCLUDE_DIR. # Where is the "-lopcodes" library, with (some of) the opcode tables and # disassemblers? ! OPCODES = ../opcodes/libopcodes.a # Where are the other opcode tables which only have header file # versions? OP_INCLUDE = $(INCLUDE_DIR)/opcode --- 214,220 ---- # in INCLUDE_DIR. # Where is the "-lopcodes" library, with (some of) the opcode tables and # disassemblers? ! OPCODES = ../opcodes/libopcodes.la # Where are the other opcode tables which only have header file # versions? OP_INCLUDE = $(INCLUDE_DIR)/opcode *************** *** 762,768 **** true ; \ fi ; \ $(srcdir)/../mkinstalldirs $(bindir) ; \ ! $(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \ $(srcdir)/../mkinstalldirs $(man1dir) ; \ $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1 @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do --- 764,770 ---- true ; \ fi ; \ $(srcdir)/../mkinstalldirs $(bindir) ; \ ! $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \ $(srcdir)/../mkinstalldirs $(man1dir) ; \ $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1 @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do *************** *** 839,845 **** # Removing the old gdb first works better if it is running, at least on SunOS. gdb$(EXEEXT): main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) rm -f gdb$(EXEEXT) ! $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) \ main.o libgdb.a $(CONFIG_OBS) $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS)\ $(LOADLIBES) --- 841,847 ---- # Removing the old gdb first works better if it is running, at least on SunOS. gdb$(EXEEXT): main.o libgdb.a $(CONFIG_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) rm -f gdb$(EXEEXT) ! $(HLDENV) $(LINK) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ main.o libgdb.a $(CONFIG_OBS) $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS)\ $(LOADLIBES) <cut here> which produces a valid shared executable on i386 systems. Being unfamiliar with the GNU autoconf/automake system, I wasn't able to set LIBTOOL properly. E-gards: Jimmy
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads