[Next] [Previous] [Up] [Top]

7 Non-Cecil Front Ends

7.1 Using the C++ Front End

Basically, the programs vortex-cc, vortex-CC, and vortex-ar replace cc (the C compiler/linker), CC (the C++ compiler/linker), and ar (the library archiver). Just edit your makefile to use vortex-* instead of *, and all will be well (hopefully!). Use vortex-cc/CC as your linker, too, if you use ld separately from cc/CC. [Make sure ~/vortex/C++/bin/shell is in your path and that CFRONTEND is defined, probably by source'ing ~/vortex/bin/shell/vortex.cshrc in your .cshrc.]

When vortex-CC acts as a linker to link a program called 'prog', its output is a file named 'prog.vortex', which basically is just a Vortex intermediate language file that contains a bunch of include directives for the .o files that make up the program. This program can be turned into a real program executable by running vortex, doing "lang C++", and then using the 'make prog.vortex' (or 'pmake prog.vortex') command line.

One subtlety is that, to fit in better with existing makefile structures, vortex-cc/CC produce .o files that really contain Vortex RTL source code. When used as a linker, however, vortex-cc/CC is smart enough to distinguish these RTL-containing .o files from real .o files, and to include appropriate directives that either include the RTL code or that will link with the separately-compiled .o file.

Similarly, vortex-ar produces a .a file that's really just a bunch of RTL include declarations. As with .o files, vortex-cc/CC is smart enough to distinguish Vortex .a files from real .a files, so that you can link with separately compiled .a files.

To test non-Vortex compilation paths on the same input source code, use vortex-{cc,CC}-native. These scripts run the EDG front-end to produce C code and then run gcc to compile the C code into native code.

It's likely that our current set-up of the C++ front-end will only work on Sparcs under SunOS, and several references to gcc-2.6.3 are made in some scripts.


How to Use the Vortex Compiler and Environments - 25 MARCH 1997
[Next] [Previous] [Up] [Top]

Generated with Harlequin WebMaker