Files
mercury/README.MS-VisualC
Peter Ross 7e21528a46 Update this file with comments contributed by Anthony Senyard.
Estimated hours taken: 0.1
Branches: main

README.MS-VisualC:
    Update this file with comments contributed by Anthony Senyard.
2001-05-30 13:51:26 +00:00

97 lines
3.1 KiB
Plaintext

-----------------------------------------------------------------------------
INTRODUCTION
Mercury is in the process of being ported to use the Microsoft Visual
C++ 6
compiler. However not all dependencies on Cygwin have been removed and
cygwin is still required for installation (see README.MS-Windows).
-----------------------------------------------------------------------------
CONFIGURATION
To use MSVC to build the compiler issue the following configure command.
CC='CL /nologo' CPP='CL /nologo /E' configure
configure defaults to using the hlc.gc grade as this is the only grade
currently supported.
-----------------------------------------------------------------------------
SOURCE INSTALLATION
In order to save time in compilation the source distribution comes with
prebuilt C files. These C files are generated using the asm_fast grade
which is incompatible with hlc.gc. In order to alleviate this problem:
1. Install cygwin (avoid the bug in sscanf with 1.3.1-1)
2. Install an asm_fast grade version of the compiler which uses gcc as
the C compiler. This can be done from a source or binary
distribution. Follow standard instructions. I suggest:
a) configure --prefix /usr/local/mercury-0.10.1
b) make install
Ensure your path has been modified so you can see the new mmc once it
is built. For example:
a) edit /etc/profile and add /usr/local/mercury-0.10.1 to PATH
3. To build a version of the mercury compiler with MSVC++ instead of
gcc, remotely check out a fresh version of the compiler, eg.
a) cvs -d :pserver:guest@cvs.mercury.cs.mu.oz.au:/home/mercury1/repository login
(password is guest)
b) cvs -d :pserver:guest@cvs.mercury.cs.mu.oz.au:/home/mercury1/repository co -r version-0_10_1 mercury
Then to use MSVC++ to build the compiler issue the following configure
command. (You must be able to run MSVC++ from command line):
CC='CL /nologo' CPP='CL /nologo /E' configure --prefix /usr/local/msmercury
(configure defaults to using the hlc.gc grade as this is the only
grade currently supported).
4. make install
DO NOT USE THE SOURCE DISTRIBUTION TO BUILD THE MS-VisualC VERSION OF
THE COMPILER!! CONFIGURE DOES NOT DETERMINE THAT THE PRE-BUILT C FILES
ARE INCOMPATIBLE IT JUST TRIES TO USE THEM ANYWAY.
-----------------------------------------------------------------------------
INSTALLING ON NETWORK DRIVES
If you want to install on the machine, foo, in the directory \usr\local
you need to add `--prefix //foo/usr/local' as an option to configure.
Then ensure that the directory that you wish to install into is mounted
somewhere, ie
mount //foo/usr/local /temp_mount_point
and then use that mount point as the location to install into
make install INSTALL_PREFIX=/temp_mount_point
This avoids the problem that
mkdir -p //foo/usr/local/xxx
fails.
-----------------------------------------------------------------------------
NONE.* GRADES
Are not supported yet! But if they were and you have a file with
a large
switch in it you need to pass the following flag to mmc
--max-jump-table-size 512
-----------------------------------------------------------------------------