forked from ocaml-flambda/flambda-backend
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@240 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
- Loading branch information
1 parent
7e691c8
commit 59cf507
Showing
3 changed files
with
328 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
INSTALLATION INSTRUCTIONS | ||
|
||
1- Edit the file Makefile.config, following the comments in that file. | ||
|
||
2- Configure the system. Change to the config/ subdirectory and do: | ||
|
||
make | ||
|
||
This generates the two configuration files "m.h" and "s.h" in the | ||
config/ subdirectory. If something goes wrong during the make, | ||
or if the generated "m.h" and "s.h" files cause errors later on, then do | ||
|
||
cp m-templ.h m.h | ||
cp s-templ.h s.h | ||
|
||
and edit "m.h" and "s.h" by hand, following the guidelines in the | ||
comments. | ||
|
||
3- From the top directory, do: | ||
|
||
make world | ||
|
||
This builds the Caml Special Light bytecode compiler for the first time. | ||
This phase is fairly verbose; consider redirecting the output to a file: | ||
|
||
make world > log.world 2>&1 # in sh | ||
make world >& log.world # in csh | ||
|
||
4- To be sure everything works well, you can try to bootstrap the | ||
system --- that is, to recompile all Caml Special Light sources with | ||
the newly created compiler. From the top directory, do: | ||
|
||
make bootstrap | ||
|
||
or, better: | ||
|
||
make bootstrap > log.bootstrap 2>&1 # in sh | ||
make bootstrap >& log.bootstrap # in csh | ||
|
||
The "make bootstrap" checks that the bytecode programs compiled with | ||
the new compiler are identical to the bytecode programs compiled with | ||
the old compiler. If this is the case, you can be pretty sure the | ||
system has been correctly compiled. Otherwise, this does not | ||
necessarily means something went wrong. The best thing to do is to try | ||
a second bootstrapping phase: just do "make bootstrap" again. It will | ||
either crash almost immediately, or re-re-compile everything correctly | ||
and reach the fixpoint. | ||
|
||
5- If your platform is supported by the native-code compiler (that is, | ||
Makefile.config sets ARCH to a value other than "none"), you can now | ||
build the native-code compiler. From the top directory, do: | ||
|
||
make opt | ||
or: | ||
make opt > log.opt 2>&1 # in sh | ||
make opt >& log.opt # in csh | ||
|
||
6- You can now install the Caml Special Light system. This will create the | ||
following commands (in the directory set to BINDIR in Makefile.config): | ||
|
||
cslc the batch bytecode compiler | ||
cslopt the batch native-code compiler (if supported) | ||
cslrun the runtime system for the bytecode compiler | ||
cslyacc the parser generator | ||
csllex the lexer generator | ||
csltop the interactive, toplevel-based system | ||
cslmktop a tool to make toplevel systems that integrate | ||
user-defined C primitives | ||
csldep output "make" dependencies for Caml sources | ||
|
||
From the top directory, become superuser and do "make install". | ||
Also do "make installopt" to install the native-code compiler, if you | ||
have compiled it. | ||
|
||
7- Installation is complete. Time to clean up. From the toplevel | ||
directory, do "make realclean". | ||
|
||
|
||
IF SOMETHING GOES WRONG: | ||
|
||
Read the "common problems" and "machine-specific hints" section at the | ||
end of this file. | ||
|
||
Check the files m.h and s.h in config/. Wrong endianness or alignment | ||
constraints in m.h will immediately crash the bytecode interpreter. | ||
|
||
If you get a "segmentation violation" signal, check the limits on the | ||
stack size and data segment size (type "limit" under csh or | ||
"ulimit -a" under bash). Make sure the limit on the stack size is | ||
at least 2M. | ||
|
||
Try recompiling the runtime system with optimizations turned off | ||
(change CFLAGS in byterun/Makefile and asmrun/Makefile). | ||
The runtime system contains some complex, atypical pieces of C code | ||
that can uncover bugs in optimizing compilers. Alternatively, try | ||
another C compiler (e.g. gcc instead of the vendor-supplied cc). | ||
|
||
You can also build a debug version of the runtime system. Go to the | ||
byterun/ directory and do "make camlrund". Then, copy camlrund to | ||
../boot/camlrun, and try again. This version of the runtime system | ||
contains lots of assertions and sanity checks that could help you | ||
pinpoint the problem. | ||
|
||
|
||
COMMON PROBLEMS: | ||
|
||
* The Makefiles assume that make execute commands by calling /bin/sh. They | ||
won't work if /bin/csh is called instead. You may have to unset the SHELL | ||
environment variable, or set it to /bin/sh. | ||
|
||
* gcc 2.6.0 has been reported to generate incorrect code for the | ||
runtime system in -O mode. Upgrade to 2.6.3. | ||
|
||
|
||
MACHINE-SPECIFIC HINTS: | ||
|
||
* On HP 9000/700 machines under HP/UX 9. Some versions of cc are | ||
unable to compile correctly the runtime system (wrong code is | ||
generated for (x - y) where x is a pointer and y an integer). | ||
Fix: use gcc. | ||
|
||
* On some Next machines. cc pretends to be gcc but is not quite gcc. | ||
If the compilation of byterun/interp.c causes syntax errors, insert | ||
#undef __GNUC__ at the very beginning of byterun/misc.h. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
LEGAL NOTICE | ||
|
||
Software: Caml Special Light, version 1.06 of September 1995, | ||
hereinafter referred to as "the software". | ||
|
||
The software has been designed and produced by Xavier Leroy and Damien | ||
Doligez, research workers for the Institut National de Recherche en | ||
Informatique et en Automatique (INRIA) - Domaine de Voluceau - | ||
Rocquencourt - 78153 Le Chesnay Cedex - France. | ||
|
||
INRIA holds all ownership rights to Caml Special Light version 1.06. | ||
|
||
The software has been registered at Agence pour la Protection | ||
des Programmes (APP). | ||
|
||
Preamble: | ||
|
||
The software is currently being developed and INRIA desires | ||
that it be used by the scientific community so as to test, evaluate | ||
and develop it. To this end, INRIA has decided to have a prototype of | ||
the software distributed on the Internet. | ||
|
||
a- Extent of the rights granted by the INRIA to the user of the software: | ||
|
||
INRIA freely grants the right to use, modify and integrate the | ||
software in another software, provided that the modifications are for | ||
personal use only. Public distribution of derivative works is not | ||
permitted, unless the user obtains the express approval of INRIA. | ||
|
||
INRIA freely grants the right to distribute executable files generated | ||
by the Caml Special Light compilers (cslc and cslopt). Binaries of the | ||
Caml Special Light run-time system (cslrun) can also be distributed | ||
freely, with the sole condition that the distribution includes the | ||
following statement: | ||
|
||
"This software includes the Caml Special Light run-time system, | ||
which is copyright 1995 INRIA." | ||
|
||
All other files generated by the Caml Special Light system, including | ||
custom toplevel systems generated by cslmktop, are considered as | ||
derivative works and cannot be publicly distributed without the | ||
express approval of INRIA. | ||
|
||
b- Reproduction of the software: | ||
|
||
INRIA grants any user of the software the right to reproduce it so as | ||
to circulate it in accordance with the same purposes and conditions as | ||
those defined at point a- above. Any copy of the software and/or relevant | ||
documentation must comprise reference to the ownership of INRIA and | ||
the present file. | ||
|
||
The user undertakes not to carry out any paying distribution of the | ||
software. However, he is authorized to bill any person or body for the | ||
cost of reproduction of said software. As regards any other type of | ||
distribution, the user undertakes to apply to obtain the express | ||
approval of INRIA. | ||
|
||
c- Guarantees: | ||
|
||
Please note that the software is a product currently being developed. | ||
INRIA shall not be responsible in any way concerning conformity, and in | ||
particular shall not be liable should the software not comply with the | ||
requirements of the user, INRIA not being obliged to repair any | ||
possible direct or indirect damage. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
This is the first public release of the Caml Special Light system. | ||
|
||
OVERVIEW: | ||
|
||
Caml Special Light is an implementation of the ML language, based on | ||
the Caml Light dialect extended with a powerful module system in the | ||
style of Standard ML. | ||
|
||
Though close to Caml Light in many ways, Caml Special Light is not the | ||
latest release of Caml Light: the language implemented has changed in | ||
significant ways, source-level compatibility is not ensured, and the | ||
implementation has been almost completely rewritten from scratch. | ||
|
||
Caml Special Light comprises two compilers. One generates bytecode | ||
which is then interpreted by a C program. This compiler runs quickly, | ||
generates compact code with moderate memory requirements, and is | ||
portable to essentially any 32 or 64 bit Unix platform. Performance of | ||
generated programs is quite good for a bytecoded implementation: | ||
almost twice as fast as Caml Light 0.7. This compiler can be used | ||
either as a standalone, batch-oriented compiler that produces | ||
standalone programs, or as an interactive, toplevel-based system. | ||
|
||
The other compiler generates high-performance native code for a number | ||
of processors. Compilation takes longer and generates bigger code, but | ||
the generated programs deliver excellent performance (our tests show | ||
that this compiler consistently outperforms Standard ML of New Jersey | ||
1.08), while retaining the moderate memory requirements of the | ||
bytecode compiler. The native-code compiler currently runs on the | ||
following platforms: | ||
|
||
Alpha processors: DecStation 3000 under OSF1 | ||
Sparc processors: Sun Sparcstation under SunOS 4.1 or Solaris 2 | ||
Intel 386 / 486 / Pentium processors: PCs under Linux | ||
Mips processors: DecStation 3100 and 5000 under Ultrix 4 | ||
|
||
Other operating systems for the processors above have not been tested, | ||
but the compiler may work under other operating systems with no or | ||
little work. | ||
|
||
This distribution has been tested on the following platforms: | ||
|
||
DecStation 3000/300, OSF/1 2.0, cc and gcc 2.5.8 | ||
SparcStation 10, SunOS 4.1.3, gcc 2.5.8 | ||
PC 486 DX2/66, Linux 1.2.13, gcc 2.5.8 | ||
DecStation 5000/200, Ultrix 4.1, cc and gcc 2.4.5 | ||
|
||
CONTENTS: | ||
|
||
INSTALL instructions for installation | ||
LICENSE license and copyright notice | ||
Makefile main Makefile | ||
Makefile.config configuration information | ||
README this file | ||
asmcomp/ native-code compiler and linker | ||
asmrun/ native-code runtime library | ||
boot/ bootstrap compiler | ||
bytecomp/ bytecode compiler and linker | ||
byterun/ bytecode interpreter and runtime system | ||
config/ autoconfiguration stuff | ||
driver/ driver code for the compilers | ||
lex/ lexer generator | ||
parsing/ syntax analysis | ||
stdlib/ standard library | ||
tools/ various utilities | ||
toplevel/ interactive system | ||
typing/ typechecking | ||
utils/ utility libraries | ||
yacc/ parser generator | ||
|
||
COPYRIGHT: | ||
|
||
All files in this distribution are copyright 1995 Institut National de | ||
Recherche en Informatique et Automatique (INRIA) and distributed under | ||
the conditions stated in file LICENSE. | ||
They can be freely redistributed for non-commercial purposes, provided | ||
the copyright notice remains attached. | ||
|
||
INSTALLATION: | ||
|
||
See the file INSTALL for installation instructions on Unix machines. | ||
|
||
DOCUMENTATION: | ||
|
||
The Caml Special Light manual is distributed in Postscript, DVI, and | ||
plain text. It can be obtained by anonymous FTP from ftp.inria.fr as | ||
described below. It is also available on the World Wide Web, at | ||
|
||
http://pauillac.inria.fr/caml/ | ||
|
||
AVAILABILITY: | ||
|
||
The complete Caml Special Light distribution resides on ftp.inria.fr, | ||
and can be accessed by anonymous FTP: | ||
|
||
host: ftp.inria.fr (192.93.2.54) | ||
directory: lang/caml-light | ||
|
||
or through a Web browser at ftp://ftp.inria.fr/lang/caml-light/. | ||
|
||
KEEPING IN TOUCH WITH THE CAML COMMUNITY: | ||
|
||
There exists a mailing list of users of the Caml implementations | ||
developed at INRIA. The purpose of this list is to share | ||
experience, exchange ideas (and even code), and report on applications | ||
of the Caml language. This list is moderated; messages can be | ||
written in English or in French. The list has about 200 subscribers. | ||
|
||
Messages to the list should be sent to: | ||
|
||
caml-list@pauillac.inria.fr | ||
|
||
If you wish to subscribe to this list, please send a message | ||
(including your email address) to: | ||
|
||
caml-list-request@pauillac.inria.fr | ||
|
||
Archives of the list are available on the World Wide Web at URL | ||
http://pauillac.inria.fr/caml/. | ||
|
||
The Usenet news group comp.lang.ml also contains discussions about | ||
the ML family of programming languages, including Caml. The newsgroup | ||
is moderated. | ||
|
||
BUG REPORTS AND USER FEEDBACK: | ||
|
||
Send your bug reports by E-mail to: | ||
|
||
caml-light@pauillac.inria.fr | ||
|
||
To be effective, bug reports should include a complete program | ||
(preferably small) that exhibits the unexpected behavior, and the | ||
configuration you are using (machine type, etc). | ||
|
||
The mailing list caml-light@pauillac.inria.fr is forwarded to | ||
a small group of implementors at INRIA. For general questions and | ||
discussions, caml-list@pauillac.inria.fr is better; for bug reports | ||
and very specific technical questions, caml-light@pauillac.inria.fr | ||
is preferred. We often cross-post from one list to the other, anyway. | ||
|