This is the mail archive of the
mailing list for the GCC project.
Re: C++ demangler horrors
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>,Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>,Oscar Fuentes <ofv at wanadoo dot es>, gcc at gcc dot gnu dot org
- Date: Tue, 1 Jul 2003 08:08:29 -0700
- Subject: Re: C++ demangler horrors
- References: <20030627014931.GA30139@lucon.org> <firstname.lastname@example.org> <Pine.BSF.email@example.com> <20030628013200.GA23878@lucon.org> <firstname.lastname@example.org> <20030628145900.GA2791@lucon.org> <20030628152805.GA3496@lucon.org> <email@example.com> <20030701142407.GA11967@lucon.org> <firstname.lastname@example.org>
On Tue, Jul 01, 2003 at 11:54:01AM -0300, Alexandre Oliva wrote:
> On Jul 1, 2003, "H. J. Lu" <email@example.com> wrote:
> > I don't get it. Are you saying you can link with libiberty before
> > libiberty is done?
> No. I'm just concerned about dependencies that might go missing.
> Modifying a file in a different directory is very bad practice in my
> > Can you tell me how a parallel build will fail with my proposal?
> At first, it seemed to me that it obviously didn't, but that still
> didn't make it right.
> Now consider a Cygwin build. The Cygwin library must not depend on
> the demangle target, otherwise we're back to the original problem.
> But both the Cygwin library and the demangler depend on libiberty.
> Now consider that the Cygwin library may be linked with libiberty
> while the demangler modifies libiberty. Oops.
The original problem is demangler depends on libstdc++ and on Cygwin
libstdc++ may depend on libiberty. I still don't see why Cygwin library
can't depend on both libstdc++ and demangler, which is libiberty
> Also, consider the case that the cygwin library might, for whatever
> reason, want to use the demangler from libiberty. What now? Should
> it really get the wrong demangler, or fail to link?
I don't see there is a problem. You can think it this way. Without
libstdc++, demangler and libiberty is a combined target. With libstdc++,
libstdc++, demangler and libiberty is a combined target. Can you tell
me where the problem is?