This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[Patch] Re-enable Tree Browser for All Front Ends (WAS: Re: Tree-SSANewbie Questions)
Sebastian Pop wrote:
[...]
>>1. Why isn't Tree Browser enabled for all front-ends
>>when --enable-tree-browser is used? For Java, I manually
>>added tree-browser.o to its Make-lang.in and things
>>seemed to work just fine - I was able to use browse_tree()
>>from within GDB, etc.
>>
>
>
> That's because the following patch didn't included @TREE-BROWSER@ in
> each compiler or didn't included it at the right place: the fix is to
> include this directly into OBJS-common:
>
> OBJS-common = ... @ANDER@ ... @TREE-BROWSER@ ...
If I move it there it ends up in libbackend.a and
is discarded by the linker as was pointed in the original
patch:
http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00235.html
I find that I can achieve the intended effect by sneaking in
@TREEBROWSER@ into the "BACKEND" definition as in the
following patch.
OK?
Index: ChangeLog
from Ranjit Mathew <rmathew@hotmail.com>
* Makefile.in (cc1): Remove @TREEBROWSER@ and move it...
(BACKEND): ...here.
Index: Makefile.in
===================================================================
--- Makefile.in 2004-05-13 19:21:24.000000000 +0530
+++ Makefile.in 2004-05-13 19:51:31.000000000 +0530
@@ -906,7 +906,7 @@ OBJS = $(OBJS-common) $(out_object_file)
OBJS-onestep = libbackend.o $(OBJS-archive)
-BACKEND = main.o libbackend.a
+BACKEND = main.o @TREEBROWSER@ libbackend.a
# Files to be copied away after each stage in building.
STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
@@ -1155,9 +1155,9 @@ $(SPECS): xgcc$(exeext)
gcc-cross: xgcc$(exeext)
cp xgcc$(exeext) gcc-cross$(exeext)
-cc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS) @TREEBROWSER@
+cc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1$(exeext) \
- $(C_OBJS) @TREEBROWSER@ $(BACKEND) $(LIBS)
+ $(C_OBJS) $(BACKEND) $(LIBS)
# Build the version of limits.h that we will install.
xlimits.h: glimits.h limitx.h limity.h