This file contains some notes on the installation of the mpC
programming environment.

The mpC programming environment is currently installed on SPARCstations
running Solaris 2.3/2.4/2.5 and SunOS 4.1.3, on HP9000 running HP-UX 9.07,
on PC running Linux (Red Hat Linux 4.0) and on DEC Alpha running OSF1 V3.2.

If you got problems during installation on another platform, please,
send your comments to mpC Compiler Group (Email: mpc@ispras.ru).


Installing mpC on SPARC running Solaris
=======================================

The mpC programming environment was developed on SPARCstations  and compiled
by GNU CC version 2.6.3. The following compilers are also used during
development and testing of this version:

GNU CC 2.7.0 and 2.7.2.
-----------------------
     The mpC programming environment is installed (compiled) with these
     compilers without problems.

     But, due to their bugs (especially in header files), the compilation
     of the mpC programs may cause errors.

     GNU CC 2.7.0 and 2.7.2 have identical bug in header file "types.h",
     which is located in directory
     /DIR/lib/gcc-lib/TARGET/VERSION/include/sys, where DIR is usually
     "/usr/local", TARGET - "sparc-sun-solaris2.4", VERSION - "2.7.0" or
     "2.7.2". The lines 60 and 61 of this file (the #else - part of
     conditional compilation
     #if !defined (__STRICT_ANSI__) && !defined(_NO_LONGLONG) ...)
     must be

          typedef  long           longlong_t;
          typedef  unsigned long  u_longlong_t;

     instead of

          typedef  long long           longlong_t;
          typedef  unsigned long long  u_longlong_t;

     (mpC compiler don't allows non-ANSI type specifiers such as
      'long long', => __STRICT_ANSI__  is already defined!)


SPARCworks(TM) Professional C 3.0.1.
------------------------------------
     You should specify one of the options '-Xc' (strict ANSI C conformance)
     or '-Xa' (ANSI C conformance and K&R extensions) if you use
     SPARC C during installation of the mpC programming environment;
     Ignore any warnings like '"-Xa" redefines compatibility mode from
     "SunC transition" to "ANSI"',  'initializer does not fit',
     'improper pointer/integer combination', etc.  We have not compiled
     mpC run-time system and user commands for LAM by SPARC C because this
     compiler reports errors in some LAM headers; we recommend you to use
     another C compiler for 'hcc'  (TROLLIUSHCC).


Special notes for SPARC running SunOS 4.1
=========================================

The mpC system version 1.2.2 was installed on SPARCstation running
SunOS 4.1.3_U1 (special thanks to Chriss Painter, West Virginia Network).
This operating system and its C compilers have some peculiarities.
The mpC environment is now adapted to this operating system, but we had
installed and tested mpC only on the top of LAM 6.0 and 6.1, and we had
used only gcc 2.7.2. If you have problems during installation, testing or
use of the mpC programming environment on SPARC running SunOS, please,
contact us.


Installing mpC on HP9000
========================

You should use CC=c89 for compilation of the mpC compiler on HP. GNU CC
is not suitable because this compiler cannot correctly process some files
from the subdirectories 'reuse' and 'front' (object files are produced,
but mpcc cannot be linked).
Ignore any warnings like 'cc: Optdriver: Exceeding compiler resource limits;
some optimizations skipped' during compilation of mpcc; any other messages
should be investigated and reported.

During recompilation of mpC compiler:
  1).Ignore warnings produced for source 'tests/selftest/reuse/Setc.c'.
  2).If you have installed mpcc with /lib/cpp, ignore messages like
    'Illegal character: \', produced by mpcc for source
    'tests/selftest/front/eval_ast.mpc'; /lib/cpp does not remove '\' at
    the end of line.
    NOTE 1: the mpC compiler produces in this case right code!
    NOTE 2: if you have GNU CC on your HP, it's better to use GNU cpp
            instead of /lib/cpp.

HP-UX malloc problem
--------------------
     We have detected an error in /lib/libc.a. The new mpcc, compiled with
     c89, breaks during compilation of some tests with "Segmentation fault"
     (in _toupper() called  from _sbrk() called from malloc(), called from
     compiler's back end). This is not a bug in the mpC compiler.
     To eliminate this error, we added another call to malloc() immediately
     before back end. We don't know why, but that works, and we have tested
     the mpC compiler version 1.2.2 without any other problems. But if you
     have any problems with the mpC compiler (especially like this), please,
     don't hesitate to contact us.


Installing mpC on PC running Linux
==================================

The mpC programming environment is installed and tested without problems,
but the preprocessor cpp used by mpcc may produce some warnings (like
'warning: `__FD_SETSIZE' redefined') for some header file. These warnings
are normal for Linux and may be ignored.

Some header files in Linux may contain alternative keywords of GNU C like
__signed__. If mpcc has detected syntax errors in one of these header
files, used by your mpC-program, add at top of your source file

#include "gnu_kw.h"

This file (located in $MPCHOME/h) contains macrodefinitions like

#define __signed__ signed

which can help you to eliminate this problem.


Installing mpC on DEC Alpha
===========================

The mpC programming environment was installed and tested on Alpha running
OSF1 V3.2; GNU C compiler version 2.7.2.2 and LAM 6.0 are used during
installing and test of the mpC programming environment. The compiler, the
run time support system and the user interface works on this platform
properly except the following warning, generated by /usr/bin/ld (ld v.3.11):

Warning: Linking some objects which contain exception information sections
	and some which do not. This may cause fatal runtime exception handling
	problems (last obj encountered without exceptions was be_print.o).

This warning may be ignored, but we will try to avoid this diagnostic in
the next version.
