README file for version 7.0 of the EDG C++ Front End
September 28, 2026

This directory contains version 6.9 of the EDG C++ Front End.
This is confidential information of Edison Design Group and can only
be used in accordance with the terms under which it has been licensed.

If you want to build the front end and read the rest of this later,
follow these steps.  This assumes Linux, but you can choose an alternate
defines.h and edg_eccp_config file from the ones provided.

	cp src/defines.h.linux src/defines.h
	cp sample_edg_eccp_config/edg_eccp_config.linux edg_eccp_config
	cd lib
	../sample_edg_eccp_config/make_g++_incl_paths
	../misc/make_predef_macro_table
	cd ..
	export EDG_BASE=$PWD
	make

The release structure contains several top-level directories:

The "src" directory contains the front end source.  This includes
the front end proper and all of the optional components, e.g.,
the IL lowering phase and the C-generating back end.  The "src"
directory also contains a "Changes" file, which gives a description
of the changes made to the front end in each release.  There are
also (smaller) Changes files in the other directories.

The "include" directory contains prototype header files.  These
are only the C/C++ headers for which EDG's front end requires some 
special magic, and not all the C/C++ standard headers.

The "lib_src" directory contains some minimal runtime support.

The "util" directory contains three utility programs:
- The edg_prelink program, which implements automatic instantiation
  of templates.
- The edg_decode program, which does name demangling.
- The edg_munch program, which works like the cfront "munch" utility.
  It generates a C program that will call all required start-up
  initialization routines.  This is needed only if your linker does
  not provide a way to get code invoked automatically at program
  start-up time.

The "misc" directory contains four other utility programs:
- The mk_errinfo program, which generates the error message tables for
  the front end.
- The dettarg program, which determines some basic configuration
  information about the computer on which it is running.
- The make_predef_macro_table script, which can be used to generate
  the predefined macros file for a given version of gcc/g++.
- The make_win_predef_macro_table.c program, which can be used to generate
  the predefined macros file for a Windows configuration.

The "doc-sphinx" directory contains the internal documentation in the
reStructuredText markup language used by Sphinx.  The directory
contains a README.md file with additional information.

The "doc" directory contains the internal documentation in HTML form.
We generate this from the .rst files in the "doc-sphinx/source"
subdirectory using the Makefile in the "doc-sphinx" directory.

We have provided a script "eccp" in the "bin" directory that runs the
front end and then the native C compiler.  It has options similar to
Unix CC.  To configure it, put a file named edg_eccp_config into the
top-level directory of the release, and set EDG_BASE to point to
that directory.  We've provided some sample edg_eccp_config files
in the sample_edg_eccp_config directory.  eccp starts by looking for
an edg_eccp_config file, which it reads as a shell script if it is
present.  This allows you to change the defaults on the environment
variables used by eccp.  You will probably want to set
EDG_DEFAULT_DEFINES to include things like -Dunix that are
appropriate on your system, and you may want to change
EDG_C_TO_OBJ_COMPILER to indicate the C compiler to use to
compile the generated C (the default is cc).

The eccp script is, obviously, useful only on systems that
understand Unix-like shell scripts.  On Windows systems, we have
a driver program edgcc, which performs the same function but is
much less sophisticated.  It is available from our web download
server.  See also the "msinfo.txt" file in the "src" directory.

The default file system on MacOS X (hfs) is case insensitive.
As a result, using "libC.a" for the name of the C++ run-time
support library causes a conflict with the C standard library
(libc.*, which must also be linked into applications).
We therefore suggest that you rename the C++ run-time support
library to "libC_EDG.a" and set EDG_LIB_SUFFIX="_EDG"
in edg_eccp_config.

See the documentation for command-line options and language dialect
issues.

There is a top-level Makefile that makes everything.  Typing "make"
will make the front end and IL display program, the utilities, and
the runtime, and place the results in the "bin" and "lib" directories.
An ISO C++11 compiler is assumed.  The C++ compiler used is whatever
"make" establishes as a default for "CC".  You can define CC when
invoking make (or in the Makefile) to use a different compiler.
You can also set a value for CFLAGS to indicate options to be used
with the C++ compiler.  You should do the necessary configuration of
eccp (described above) before building the runtime.

On Windows, if you have the front end configured to allow C++/CLI or C++/CX
(see CPPCLI_ENABLING_POSSIBLE and CPPCX_ENABLING_POSSIBLE), you will need the
following:

- Visual Studio 2015 or newer.
- The alink.h header file  Formerly, this was available on the Microsoft
  web site at a location that was specified in the ms_metadata.cpp file.
  It is now included with installations of Visual Studio (beginning with
  Visual Studio 2012) as part of the Windows 8 (and newer) and .NET
  Framework SDKs.
- The atlmfc include directory, which is not included in the "Express"
  versions of Visual Studio.

In addition, you will need to link with mscoree.lib and oleaut32.lib.

There are also Makefiles in the subdirectories if you want to build
just some of the components.

On systems that do not support Makefiles, you'll have to come up
with your own procedure for compiling the source.  (Again, on Windows
see the src/msinfo.txt file.)

If you don't put a defines.h file of your own in the src directory,
one will be fabricated from the defines.h.proto prototype and
the output of running the misc/dettarg program.  This does the
absolute minimum configuration, for sizes and alignments of data types
and assumes that the host and target architectures are the same.
You will probably want to do more configuration than that: see the
"Configuring and Building the C++ Front End" chapter of the internal
documentation, and the files lang_feat.h, host_envir.h, and targ_def.h.
For Solaris, Windows, Linux, and MacOS X, we have provided appropriate
defines.h files; see defines.h.solaris, defines.h.win32,
defines.h.linux, and defines.h.macosx.  If you want to use one of
those, copy it to defines.h.

The front end can be configured to support multiple target configurations.
In such cases, multiple lib directories and versions of the runtime
library are required.  See chapter 2 of the plm.pdf for more information.
