[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
33.5 Examples
In this example we will show how to compile for a host-machine that has ssh-access.
We assume
- a working Bigloo (should be the same version as the one that is going to be compiled for the host) in the PATH.
- ssh access to the host. This access should be without password
(using keys). The system should be accessible by
ssh [host]
(where[host]
should be replaced with the correct address). - a C cross-compiler
CC
running on the build-system and compiling for the host.
With these preconditions satisfied we can first build Bigloo for the host-system:
$ ./configure –hostsh="$PWD/examples/hostsh/ssh/ssh-copy.sh [host]" –cc=[CC] $ make $ make DESTDIR=[TMP] install
Now let’s compile a simple hello-world for the host.
$ cat > /tmp/hello.scm <<EOF (module hello (main main)) (define (main args) (print "hello world")) EOF $ bigloo -static-all-bigloo -lib-dir [TMP]/lib/3.2c/ -o /tmp/hello /tmp/hello.scm
The generated executable should be able to run on the host.
This document was generated on March 31, 2014 using texi2html 5.0.