chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] cross compilation, emedded platform


From: felix winkelmann
Subject: Re: [Chicken-users] cross compilation, emedded platform
Date: Mon, 10 Jul 2006 08:01:29 +0200

Dan, you really want to read this:

http://galinha.ucpel.tche.br/generating%20the%20smallest%20possible,%20self-contained%20executable

Essentially, you can build a working Scheme executable like this:

crossgcc -c library.c
crossgcc -c runtime.c
csc -t myprog.scm -x -uses library
crossgcc -c myprog.c
crossgcc myprog.o library.o runtime.o -o myprog

Vastly simplified of course, but you really just need runtime.c and
library.c (not chicken.c). The "-x" tells chicken not to use the eval
and extras units by default. You can of course compile those as well
and link them in. (you don't need the -x, then). You can also put
library.o, runtime.o (and others) into a static library for your target.
The chicken build system is actually very simple and you don't need
to wrestle with autotools, unless you want to automate everything.
Just figure out good default nursery sizes, stack-direction, whether you
need -lm or dynamic loading and do things by hand.


cheers,
felix




reply via email to

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