3 # This script is useful primarily when you have a target machine
4 # that can make its own 'local-target-features', but you'd rather run
5 # the bulk of the compilation on a different (presumably faster) machine.
7 # The script is to executed on the machine that compiles the Lisp tree.
8 # SSH is invoked to compile the C runtime.
9 # Passwordless login to the target machine is required.
11 #config_options="--without-gencgc --with-cheneygc"
23 # Perform configuration on the target machine at the same git revision
24 local_rev
=`git rev-parse HEAD`
25 checkout
="git checkout $local_rev"
28 checkout
="git checkout master"
31 checkout
="echo not syncing remote"
34 echo "Usage error: cross-make.sh {sync|head|nosync} host dir [env]"
38 host=$1 # can have the form 'user@host' if necessary
39 root
=$2 # path to source directory on $host
40 ENV
=$3 # if you need to set SBCL_ARCH,CFLAGS,etc remotely
45 ssh $ssh_port_opt $host cd $root \
; $checkout '&&' \
46 $ENV sh make-config.sh
$config_options '&&' \
47 mv version.lisp-expr remote-version.lisp-expr
48 scp
$scp_port_opt $host:$root/{remote-version.lisp-expr
,local-target-features.lisp-expr
,output
/build-id.inc
} .
49 mv build-id.inc output
50 #diff version.lisp-expr remote-version.lisp-expr || exit 1
52 # make-host-1 and copy the generated C headers to the target machine
54 tar cf
- src
/runtime
/genesis output
/ucd |
ssh $ssh_port_opt $host cd $root \
; tar xf
-
56 # make-target-1 and copy back the artifacts
57 ssh $ssh_port_opt $host cd $root \
; $ENV sh make-target-1.sh
58 scp
$scp_port_opt $host:$root/output
/stuff-groveled-from-headers.lisp output
60 # make-host-2 and copy over the artifact
62 scp
$scp_port_opt -C output
/cold-sbcl.core
$host:$root/output
64 # make-target-2 and the two contribs required to execute 'core.test.sh'
65 ssh $ssh_port_opt $host cd $root \
; sh make-target-2.sh
'&&' \
66 sh make-target-contrib.sh sb-posix sb-bsd-sockets