summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-03-11 16:13:15 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-03-11 16:13:15 +0000
commite2fb435c257cf6aac24e7b30f902bede694100c5 (patch)
tree7c498eb9dbed3d4c194fc965704e5ed57e75672f /README
parentc7a642bf2156221a5c93826444e5e49ebb3b682b (diff)
Minor updates
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1848 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'README')
-rw-r--r--README196
1 files changed, 9 insertions, 187 deletions
diff --git a/README b/README
index 08ce2b0..fa8d435 100644
--- a/README
+++ b/README
@@ -1,211 +1,33 @@
- The Compcert verified compiler
+ The CompCert C verified compiler
OVERVIEW:
-The Compcert verified compiler is a compiler for a large subset of the
+The CompCert C verified compiler is a compiler for a large subset of the
C programming language that generates code for the PowerPC, ARM and x86
processors.
-The distinguishing feature of Compcert is that it has been formally
+The distinguishing feature of CompCert is that it has been formally
verified using the Coq proof assistant: the generated assembly code is
formally guaranteed to behave as prescribed by the semantics of the
source C code.
-Compcert is an ongoing research project. The present release is an
+CompCert is an ongoing research project. The present release is an
advanced prototype intended for research, educational and evaluation
purposes.
+For more information on CompCert (supported platforms, supported C
+features, installation instructions, using the compiler, etc), please
+refer to the user's manual: http://compcert.inria.fr/man/
+
COPYRIGHT:
-The Compcert verified compiler is Copyright 2004, 2005, 2006, 2007,
+The CompCert verified compiler is Copyright 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011, 2012 Institut National de Recherche en
Informatique et en Automatique (INRIA). It is distributed under the
conditions stated in file LICENSE.
-SUPPORTED PLATFORMS:
-
-- PowerPC / MacOS [stable]
- For Apple Macs running the MacOS 10.4, 10.5 or 10.6 operating system.
- Both PowerPC-based and Intel-based Macs are supported.
- The PowerPC code generated by the Compcert compiler runs
- natively at full speed on PowerPC-based Macs, and runs under
- software emulation at reduced speed on Intel-based Macs.
-
-- PowerPC / Linux [stable]
- For PowerPC machines running the Linux operating system.
-
-- IA32 / Linux or MacOS or Windows+Cygwin [stable]
- For Intel/AMD x86 processors with SSE2 extensions
- (i.e. Pentium 4 and later), running either Linux, MacOS 10.6 or 10.7,
- or Windows with the Cygwin environment (http://www.cygwin.com/).
-
-- ARM / Linux [experimental]
- For ARM machines running the Linux operating system.
-
-
-PREREQUISITES:
-
-* The "gcc", "as" and "make" tools must be installed and accessible in
- the search path. For MacOS X, you can get them by installing the
- XCode development tools, as found on the installation DVDs
- or on http://developer.apple.com/. For Microsoft Windows,
- install the Cygwin environment http://www.cygwin.com/.
-
-* The Coq proof assistant, version 8.3pl1.
- Coq is free software, available from http://coq.inria.fr/
- The original version 8.3 is not compatible, nor any of the 8.2 versions.
-
-* The Caml functional language, version 3.10 or later.
- Caml is free software, available from http://caml.inria.fr/
-
-* Under MacOS, some standard C include files in /usr/include/
- contain gcc-isms that cause errors when compiling with CompCert.
- Symptoms include:
- - references to undefined types uint16_t and uint32_t
- - a type error when using the "assert" macro.
- These issues have been reported through Apple Developer's Connection.
- Until Apple fixes them, you can apply the patch available from
- http://compcert.inria.fr/release/MacOSX-includes.patch
- Download this file, then do:
- sudo /bin/bash
- cd /
- patch -p0 < ..../MacOSX-includes.patch
-
-
-INSTALLATION:
-
-1- Configure the system. From the top directory, do:
-
- ./configure <target>
-
-where <target> is one of:
-
- ppc-macosx (PowerPC, MacOS X)
- ppc-linux (PowerPC, Linux)
- ppc-eabi-unix (PowerPC, EABI with Unix tools)
- ppc-eabi-diab (PowerPC, EABI with Diab tools)
- arm-linux (ARM, Linux)
- ia32-linux (x86 SSE2 32 bits, Linux)
- ia32-macosx (x86 SSE2 32 bits, MacOS X)
- ia32-cygwin (x86 SSE2 32 bits, Cygwin environment for Windows)
-
-This generates the Makefile.config file in the top directory.
-
-The "configure" script accepts the following options:
-
--bindir <dir> (default: /usr/local/bin)
- Directory where the binaries will be installed
-
--libdir <dir> (default: /usr/local/lib/compcert)
- Directory where the Compcert support library will be installed
- (needed only under MacOS X)
-
--prefix <dir> (default: /usr/local)
- Set bindir and libdir to
- <dir>/bin and <dir>/lib/compcert, respectively.
-
-2- Build the system. From the top directory, do
-
- make all
-
-This re-checks all the Coq proofs, then extracts Caml code from the
-Coq specification and combines it with supporting hand-written Caml
-code to generate the executable for Compcert. This step takes 20
-minutes or so on a recent machine; be patient.
-
-
-3- You can now install Compcert. This will create the "ccomp" command
-in the binary directory selected during configuration, and install
-supporting .h and .a files in the library directory. Become superuser
-if necessary and do
-
- make install
-
-
-USAGE:
-
-The executable for Compcert is called "ccomp". It has the standard
-command-line interface for a Unix C compiler. For instance, to
-compile the single-file program "src.c" and create an executable
-called "exec", just do
-
- ccomp -o exec src.c
-
-To compile a two-file program "src1.c" and "src2.c", do
-
- ccomp -c src1.c
- ccomp -c src2.c
- ccomp -o exec src1.o src2.o
-
-To see the generated assembly code for "src1.c", do
-
- ccomp -S src1.c
-
-The generated assembly code is left in file src1.s
-
-The subset of the C language accepted by Compcert is quite large.
-The main features of C that are not supported are:
- - The "long long" and "long double" types.
- - Non-structured forms of the "switch" statement (Duff's device).
- - Variable-argument functions.
-The "ccomp" command will issue errors and diagnostics if it encounters
-a C construct that it cannot process.
-
-The "ccomp" command recognizes the following classes of input files:
- .c C source file
- .cm Cminor source file
- .s Assembly file
- .S Assembly file, to be run through the C preprocessor
- .o Object code file
- .a Library file
-
-The "ccomp" command recognizes the following options:
-
-Processing options:
- -E Preprocess only, send result to standard output
- -S Compile to assembler only, save result in <file>.s
- -c Compile to object file only (no linking), result in <file>.o
-Preprocessing options:
- -I<dir> Add <dir> to search path for #include files
- -D<symb>=<val> Define preprocessor symbol
- -U<symb> Undefine preprocessor symbol
-Language support options (use -fno-<opt> to turn off -f<opt>) :
- -fbitfields Emulate bit fields in structs [off]
- -flonglong Partial emulation of 'long long' types [on]
- -flongdouble Treat 'long double' as 'double' [off]
- -fstruct-return Emulate returning structs and unions by value [off]
- -fvararg-calls Emulate calls to variable-argument functions [on]
- -fpacked-structs Emulate packed structs [off]
- -fall Activate all language support options above
- -fnone Turn off all language support options above
-Code generation options:
- -fmadd Use fused multiply-add and multiply-sub instructions
- -fsmall-data <n> Set maximal size <n> for allocation in small data area
- -fsmall-const <n> Set maximal size <n> for allocation in small constant area
-Tracing options:
- -dparse Save C file after parsing and elaboration in <file>.parse.c
- -dc Save generated Compcert C in <file>.compcert.c
- -dclight Save generated Clight in <file>.light.c
- -dcminor Save generated Cminor in <file>.cm
- -drtl Save unoptimized generated RTL in <file>.rtl
- -dtailcall Save RTL after tail call optimization in <file>.tailcall.rtl
- -dcastopt Save RTL after cast optimization in <file>.castopt.rtl
- -dconstprop Save RTL after constant propagation in <file>.constprop.rtl
- -dcse Save RTL after CSE optimization in <file>.cse.rtl
- -dalloc Save LTL after register allocation in <file>.alloc.ltl
- -dmach Save generated Mach in <file>.mach
- -dasm Save generated assembly in <file>.s
-Linking options:
- -l<lib> Link library <lib>
- -L<dir> Add <dir> to search path for libraries
- -o <file> Generate executable in <file> (default: a.out)
-General options:
- -stdlib <dir> Set the path of the Compcert stdlib wrappers
- -v Print external commands before invoking them
-
-
CONTACT:
The authors can be contacted by e-mail at compcert@yquem.inria.fr