This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Putting C++ code into gcc front end


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.
* Use stage1 xgcc to build a full copy of the compiler.  This is stage2 
xgcc.
* 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.  Accordingly, stage1 xgcc would 
need to *be* a C++ compiler.  So step one would have to become
* Build a C/C++/Ada compiler, using installed C and Ada compilers.  This 
is the stage1 xgcc.

But as Zack pointed out, the C++ front end uses GNU extensions to C, so 
it can only be built with GCC.  Accordingly, if the installed C compiler 
wasn't gcc, we'd have to add a previous step:

* Build a C compiler, using installed CC.  This is the 'stage0' gcc.

So it's quite definitely more trouble if the Java front end uses C++ 
code.

--Nathanael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]