[gambit-list] Gambit and termite on an embedded system (Nintendo DS)?

Marc Feeley feeley at iro.umontreal.ca
Sun Oct 22 21:26:32 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22-Oct-06, at 6:28 PM, Andrew Lentvorski wrote:

> This is the first change which is requiring me to actually rerun gsc.
>
> So, the question:
>
> How do I build gsc to work in a cross compiling environment?
>
> Presumably, I need to specify an option which will use an  
> installation of gambit *external* to the currently compiling gambit  
> (which will not work on the host OS).
>
> Where would I do so?  The makefiles seem to want to pull in the  
> gambit from the current directories.

Go to a workstation which supports Gambit (Unix, Mac OS X, or Windows  
with MinGW) and build Gambit 4.0 beta 20 from the standard  
distribution.  This will give you the Gambit compiler in gsc/gsc .

Now modify whatever Scheme sources you want in the lib and gsi  
subdirectories.  If you modify something in the lib directory then do  
a make **in that directory**.  If you modify something in the gsi  
directory then do a make **in that directory**.  This will create  
new .c files from the .scm files you have changed **and** new link  
files (either lib/_gambc.c or gsi/_gsi_.c).  Make sure you copy all  
the .c files that have changed to the directory where you keep the  
Nintendo sources.

Be careful, if you do a make in the gsc subdirectory or in Gambit's  
root directory then you will create a new gsc/gsc that includes your  
Nintendo specific modifications, which may break the compiler  
sufficiently to make it unusable for future compilations.  It is a  
good idea to make a backup of gsc/gsc (i.e. "cp gsc/gsc gsc/gsc- 
good") so that you can revert to it.  It might also be simpler to  
have two copies of the whole Gambit source tree.  One is used to  
build gsc/gsc, and the other to build the runtime system (just do "cd  
gambit-copy1 ; make ; cp gsc/gsc ../gambit-copy2/gsc/gsc ; cd ../ 
gambit-copy2 ; make clean ; cd lib ; make ; cd ../gsi ; make").

I'll see if I can change the makefiles to make it easier to use  
Gambit as a cross-compiler (my idea is to use "gsc/gsc-comp" as the  
Gambit compiler to compile the .scm files in the source tree, and  
"gsc/gsc" is the target of the make; there will be an extra step  
needed to copy "gsc/gsc" to "gsc/gsc-comp" to bootstrap the system,  
obtained with a "make bootstrap").

Marc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFPBpI//V9Zc2T/v4RAv9MAJ9FNTGd4K2Aly2HiL1Lz8ftlHFBbwCfemLH
u74gHVygjyVCua5vdZwXv5g=
=WVPr
-----END PGP SIGNATURE-----



More information about the Gambit-list mailing list