For review: build libgdb.a and then build gdb
Andrew Cagney
ac131313@cygnus.com
Mon Aug 23 03:15:00 GMT 1999
Hello,
The attached patch changes the final GDB build into a two stage process
- build a library and then link GDB against that. The final objective
is to simplify the task of integrating things like insight.
At the same time I flushed a few remaining references to the old libgdb.
Andrew
Mon Aug 23 19:36:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (libgdb.a): New target.
(gdb$(EXEEXT)): Add dependency on libgdb.a.
(libgdb-files, LIBGDB_OBS, libgdb, LIBGDBDEPS, LIBGDBFILES):
Delete.
Index: Makefile.in
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/Makefile.in,v
retrieving revision 1.687
diff -p -r1.687 Makefile.in
*** Makefile.in 1999/08/16 20:42:54 1.687
--- Makefile.in 1999/08/23 10:05:16
*************** COMMON_OBS = version.o blockframe.o brea
*** 606,615 ****
c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o
! OBS = $(COMMON_OBS) $(ANNOTATE_OBS) main.o
- LIBGDB_OBS =
-
TSOBS = inflow.o
NTSOBS = standalone.o
--- 606,613 ----
c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o
! OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
TSOBS = inflow.o
NTSOBS = standalone.o
*************** init.c: $(OBS) $(TSOBS)
*** 747,774 ****
.PRECIOUS: init.c
# Removing the old gdb first works better if it is running, at least on SunOS.
! gdb$(EXEEXT): $(OBS) $(BUILD_TUI) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
rm -f gdb$(EXEEXT)
! $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) \
! init.o $(OBS) $(TSOBS) $(TUI_LIBRARY) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
nlm: force
rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
-
- libgdb: libgdb-files $(LIBGDB_OBS)
! # libproc is not listed here because all-libproc is a dependency of all-gui,
! # not all-gdb, and thus might be built after us.
! LIBGDBDEPS=$(COMMON_OBS) $(LIBGDB_OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
! # libproc needs to be before libiberty for alloca.
! LIBGDBFILES=$(COMMON_OBS) $(LIBGDB_OBS) $(TSOBS) ../libproc/libproc.a \
! $(ADD_DEPS) $(CDEPS) init.o
!
! libgdb-files: $(LIBGDBDEPS) Makefile.in
! -rm -f libgdb-files
! for i in $(LIBGDBFILES); do\
! echo $$i >> libgdb-files;\
! done
saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
--- 745,766 ----
.PRECIOUS: init.c
# Removing the old gdb first works better if it is running, at least on SunOS.
! gdb$(EXEEXT): libgdb.a $(ADD_DEPS) $(CDEPS)
rm -f gdb$(EXEEXT)
! $(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) main.o libgdb.a $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
nlm: force
rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
! # Create a library of the gdb object files and build GDB by linking
! # against that.
! #
! # init.o is very important. It pulls in the rest of GDB.
! LIBGDB_OBS= $(OBS) $(TSOBS) $(ADD_FILES) init.o
! libgdb.a: $(LIBGDB_OBS)
! -rm -f libgdb.a
! $(AR) q libgdb.a $(LIBGDB_OBS)
! $(RANLIB) libgdb.a
saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
*************** clean mostlyclean:
*** 858,864 ****
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp
rm -f init.c version.c
! rm -f gdb$(EXEEXT) core make.log libgdb-files
rm -f gdb[0-9]$(EXEEXT)
# This used to depend on c-exp.tab.c m2-exp.tab.c TAGS
--- 850,856 ----
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp
rm -f init.c version.c
! rm -f gdb$(EXEEXT) core make.log
rm -f gdb[0-9]$(EXEEXT)
# This used to depend on c-exp.tab.c m2-exp.tab.c TAGS
More information about the Gdb-patches
mailing list