aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL.md
diff options
context:
space:
mode:
authorMatheus Schuh <mschuh@kalray.eu>2019-07-09 12:26:39 +0200
committerMatheus Schuh <mschuh@kalray.eu>2019-07-09 12:26:39 +0200
commit579f9df3d1f77e9db1696cb438ba00f6e3043ff3 (patch)
treee6a41b6c5bd697b62dc8478db8158004ad60a962 /INSTALL.md
parent15cf7f38d7cc5c0794adae8c3cecae7c62b9fff1 (diff)
downloadcompcert-kvx-579f9df3d1f77e9db1696cb438ba00f6e3043ff3.tar.gz
compcert-kvx-579f9df3d1f77e9db1696cb438ba00f6e3043ff3.zip
Initial version of install instructions
Mainly focused on Kalray platform
Diffstat (limited to 'INSTALL.md')
-rw-r--r--INSTALL.md62
1 files changed, 62 insertions, 0 deletions
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 00000000..bcfec78f
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,62 @@
+# CompCert Install Instructions
+
+## Dependencies
+### Additional dependencies
+Replace with the package manager for your distribution
+```
+sudo <pkg-manager> install -y mercurial darcs ocaml
+
+```
+
+### Opam
+```
+sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
+```
+
+## Post-install
+Run
+```
+eval `opam config env`
+```
+Add this to your `.bashrc` or `.bash_profile`
+```
+. /nfs/home/mschuh/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
+```
+Switch to last compiler version
+```
+opam switch 4.07.0
+```
+Install dependecies available through opam
+```
+opam install coq menhir
+```
+
+## Compilation
+Pre-compilation configure replace the placeholder with your desired platform
+(for Kalray it is k1c-cos or k1c-mbr)
+```
+./configure <platform>
+```
+If using Kalray's platform, make sure that the k1 tools are on your path
+Compile (adapt -j# to the number of cores and available RAM)
+```
+make -j12
+make install
+```
+
+## Utilization
+`ccomp` binaries are installed at `$(HOME)/.usr/bin`
+Make sure to add that to your path to ease its use
+Now you may use it like a regular compiler
+```
+ccomp -O3 test.c -S
+ccomp -O3 test.c -o test.bin
+```
+
+## Changing platform
+If you decide to change the platform, for instance from k1c-cos to k1c-mbr, you
+should change the `compcert.ini` file with the respective tools and then run
+```
+make install
+```
+