<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.1.92">
</HEAD>
<BODY>
On Mon, 2012-03-05 at 11:31 -0500, Marc Feeley wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    I can feel your pain and determination.  So here are some ideas which should help debug this.<BR>
    <BR>
    1) Make sure you use --enable-ansi-c when configuring Gambit.  This will force the use of a small subset of the ANSI-C headers and libraries (such as stdio.h, stdlib.h, math.h).  This is the place to start for a small embedded device with minimal peripherals.  If you are compiling with your own makefile, this will happen automatically (unless you have a config.h or other header file which defines HAVE_WAITPID, which causes lib/os.h to assume you are on a POSIX system with all the POSIX goodies).<BR>
</BLOCKQUOTE>
<BR>
If you build Gambit on a linux box, say, then in lib/_num.scm change<BR>
<BR>
<PRE>
(##define-macro (use-fast-bignum-algorithms) #t)
</PRE>
<BR>
to<BR>
<BR>
<PRE>
(##define-macro (use-fast-bignum-algorithms) #f)
</PRE>
<BR>
and rebuild Gambit (to update _num.c), then you will get rid of the extra code for the "fast" bignum algorithms and save about 150KB on my box (which isn't a lot, but every sometimes every byte counts).  Before:<BR>
<BR>
<PRE>
heine:~/programs/gambc-v4_6_4-devel> ll */*.so
-rwxrwxr-x 1 lucier lucier 6676291 2012-02-23 13:49 lib/libgambc.so*

</PRE>
After:<BR>
<BR>
<PRE>
heine:~/programs/gambc-v4_6_4-devel> ll */*.so
-rwxrwxr-x 1 lucier lucier 6526571 2012-03-05 11:42 lib/libgambc.so*

</PRE>
Brad
</BODY>
</HTML>