[m-dev.] for review: update README.MS-VisualC

Fergus Henderson fjh at cs.mu.OZ.AU
Wed May 30 23:18:35 AEST 2001


On 30-May-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> README.MS-VisualC:
>     Update this file with comments contributed by Anthony Senyard.
...
> +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 at cvs.mercury.cs.mu.oz.au:/home/mercury1/repository login
> +   (password is guest)
> +   b) cvs -d :pserver:guest at 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.

This documentation is OK.
Please go ahead and commit it.

But it would be nicer to fix the problem rather than merely documenting it.

The sources included in the source distribution are generated using
asm_fast.gc, but they should also be compatible with reg.gc and none.gc.
In particular, you should be able to compile them using MSVC in grade
none.gc.  However, as a result of Pete's change a while ago, the configure
script defaults to grade hlc.gc for MSVC, *even if there is no installed
Mercury compiler to bootstrap with*.

In the longer term we should think about shipping the source distribution,
or at least _a_ source distribution, with the C files generated in grade
hlc.gc.  This would be more useful for non-GCC C compilers, or for
architectures which we haven't ported Mercury to yet (i.e. for which only
none.gc or reg.gc is supported, rather than asm_fast.gc).

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list