mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] Cross compilation


From: Taylor R Campbell
Subject: [MIT-Scheme-devel] Cross compilation
Date: Tue, 11 Dec 2018 16:19:04 +0000

The cross-fasdump-v2 branch has some more progress toward a cross
compiler.  Here's the preliminary intended usage model, which
shouldn't have any manual steps beyond these unless I made a mistake.

Toolchain on cross host:
1. ./configure --prefix=/path/to/toolchain --with-compiler-target=svm1-64le
2. make all-toolchain
3. make install-toolchain

(The choice of svm1 architecture in the configure step above must
match the host characteristics of the target system.  E.g., if you
want to build the svm1 that runs on 32-bit powerpc, this must be
svm1-32be.  I used svm1-64le on amd64 for development.)

Build on cross host:
1. export PATH=/path/to/toolchain/bin
2. ./configure --enable-native-code=svm1-64le --enable-cross-compiling 
--enable-host-scheme-test
3. make

Transport to cross target and run there:
1. make cross-target
2. make all-native

Quirks that should be adjusted:
- We should use standard --build/--host/--target options if possible.
- `--enable-host-scheme-test' should not be necessary but it currently
  is if you're doing incremental work and you've already generated
  lib/all.com on the target.

And longer-term goal that we're still a ways away from:
- All steps requiring running code on the cross target should be
  eliminated by consistently using a cross-compiler for everything.

But at least this should help to cross-build across word sizes and
byte orders, which I last did a decade ago with LIARC and with
apparently more patience than I remember having!  There _should_ be no
need for an intermediate SVM or LIARC system at all now, though I
haven't yet tested (e.g.) cross-compiling an i386 system on amd64, or
writing an aarch64 compiler back end.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]