RFA: Please review the new C++ demangler patch

H. J. Lu hjl@lucon.org
Wed Jun 25 21:39:00 GMT 2003


On Wed, Jun 25, 2003 at 10:32:14AM -0700, Zack Weinberg wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
> 
> >> Having the C++ compiler around should not be a problem.  I'm worried
> >> about the requirement for libstdc++, which (as discussed upthread)
> >> produces nasty circular build dependencies that I am not convinced
> >> have been adequately addressed.
> >
> > The circular build dependency is only a concern for the target
> > demangler library. There are
> >
> > configure-target-demangler: maybe-all-target-libstdc++-v3
> > all-target-demangler: configure-target-demangler
> >
> > in Makefile.tpl. That is we build the target demangler after libstdc++
> > is available.
> 
> So you want to have two copies of the demangler?  Or how do you
> propose to get the demangler into libstdc++?

There are always 2 C++ demanglers. One is in libiberty and the other
is in libstdc++. If you count target vs. build, you have 2 libiberty
libraries, one for target and the other for build. The one in
libstdc++ is the good one. I want to use the same one in libiberty.
There are 2 patches:

1. A patch to create a new demangler library and use it for libiberty
if a working C++ compiler is available.
2. A patch for libstdc++ to use the new demangler library.

See

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11028

The libstdc++ patch is at

http://gcc.gnu.org/bugzilla/attachment.cgi?id=4108&action=view

> 
> > It is only useful if the C++ compiler for build doesn't have a
> > working <vector>. The demangler configure checks if the C++ compiler
> > can compile the demangler and link the resulting demangler library
> > with the C compiler before enabling it. It doesn't handle the case
> > where <vector> exists, but doesn't work right. But I don't think it
> > should be a factor here. I don't see why any gcc developers should
> > spend time to help broken C++ compilers.
> 
> The case of concern is where the "C++ compiler for build" does not
> exist; i.e. bootstrapping from just a C compiler.

What is the problem? You won't get the new demangler for build. But
you will get the new demangler for target if you enable the C++
compiler.


H.J.



More information about the Gcc mailing list