This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Putting C++ code into gcc front end
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 04 Mar 2003 10:18:17 +0100
- Subject: Re: Putting C++ code into gcc front end
- Organization: Integrable Solutions
- References: <20030304084737.GA1043@doctormoo>
Nathanael Nerode <neroden at twcny dot rr dot com> writes:
| Gaby wrote:
| > You don't need to install C++ first. You just need to build C++.
| > And you have to do that anyway if you want libjava/verify.cc.
| > So that is a non-issue.
|
| Wrong.
|
| Currently, it works as follows in the non-native case:
| * Build a full copy of gcc, using installed C and Ada compilers.
| * Use this copy of GCC to build libraries.
|
| This would have to be changed if the Java front end contained C++ code.
|
| --
| In the bootstrap case it works as follows:
| * Build a C/Ada compiler, using installed C and Ada compilers. This is
| the stage1 xgcc.
OK.
| * Use stage1 xgcc to build a full copy of the compiler. This is stage2
| xgcc.
OK.
| * Use stage2 xgcc to build another full copy of the compiler. This is
| stage3 xgcc (and acts as a test that the C and Ada compilers work).
|
| Here, if the Java front end contained C++ code, then stage2 xgcc would
| need to be built with a C++ compiler.
Yes.
| Accordingly, stage1 xgcc would need to *be* a C++ compiler.
No, that does not follow: We never actually bootstrap for the C++
compiler. Currently, we only bootstrap the C compiler and and diff the
objets. That does not act as a test that the C++ compiler works. It
just does test the C compiler.
To correct your scheme, here is how it could proceed:
* Use stage1 to build G++:
+ build g++ (which becomes a stage2 compiler)
+ use stage2 g++ to build the C++ runtime system.
This step is part of using stage2 xgcc to build the full
compiler.
No trouble.
-- Gaby