This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Add --enable-tree-browser
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 05 Apr 2004 14:02:54 +1000
- Subject: [tree-ssa] Add --enable-tree-browser
The following patch adds an --enable-tree-browser option to solve the
problem of code from tree-browser.o being discarded by the linker when
linking cc1. This problem was discussed a week or two ago and this
patch implements the proposed fix. Okay for the branch?
Ben
2004-04-05 Ben Elliston <bje@au.ibm.com>
* Makefile.in (OBJS-common): Remove tree-browser.o.
(cc1): Depend on @TREEBROWSER@ and include in list of objects.
* configure.ac: Add --enable-tree-browser option.
* configure: Rebuild.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.903.2.198
diff -u -p -r1.903.2.198 Makefile.in
--- Makefile.in 2 Apr 2004 13:41:36 -0000 1.903.2.198
+++ Makefile.in 5 Apr 2004 03:50:07 -0000
@@ -868,7 +868,7 @@ C_OBJS = c-parse.o c-lang.o stub-objc.o
OBJS-common = \
tree-cfg.o tree-dfa.o tree-eh.o tree-ssa.o tree-optimize.o tree-simple.o \
tree-alias-type.o gimplify.o tree-pretty-print.o tree-into-ssa.o \
- tree-outof-ssa.o tree-alias-common.o tree-ssa-ccp.o tree-browser.o \
+ tree-outof-ssa.o tree-alias-common.o tree-ssa-ccp.o \
@ANDER@ tree-ssa-dce.o tree-ssa-copy.o tree-nrv.o tree-ssa-copyrename.o \
tree-ssa-pre.o tree-ssa-live.o tree-ssa-operands.o tree-ssa-alias.o \
tree-ssa-phiopt.o tree-ssa-forwprop.o tree-nested.o tree-ssa-dse.o \
@@ -1152,9 +1152,9 @@ $(SPECS): xgcc$(exeext)
gcc-cross: xgcc$(exeext)
cp xgcc$(exeext) gcc-cross$(exeext)
-cc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS)
+cc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS) @TREEBROWSER@
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1$(exeext) \
- $(C_OBJS) $(BACKEND) $(LIBS)
+ $(C_OBJS) @TREEBROWSER@ $(BACKEND) $(LIBS)
# Build the version of limits.h that we will install.
xlimits.h: glimits.h limitx.h limity.h
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.10.2.9
diff -u -p -r2.10.2.9 configure.ac
--- configure.ac 2 Apr 2004 13:41:36 -0000 2.10.2.9
+++ configure.ac 5 Apr 2004 03:50:10 -0000
@@ -544,6 +544,14 @@ if test x$enable_gather_detailed_mem_sta
[Define to enable detailed memory allocation stats gathering.])
fi
+AC_ARG_ENABLE(tree-browser,
+[ --enable-tree-browser enable the tree browsing routines for debugging], [],
+[enable_tree_browser=no])
+if test x$enable_tree_browser = xyes ; then
+ TREEBROWSER=tree-browser.o
+fi
+AC_SUBST(TREEBROWSER)
+
# -------------------------------
# Miscenalleous configure options
# -------------------------------