[racket] Cross compile to PowerPC

From: Tim Brown (mightyfoo at gmail.com)
Date: Thu Apr 18 09:51:55 EDT 2013

On 17/04/13 22:49, Matthew Flatt wrote:
> At Tue, 16 Apr 2013 13:06:51 +0100, Tim Brown wrote:

> Does `strip -S' reduce the size of `racket'? I don't have a PPC machine
> handy, but I get a 7686107-byte executable for ARM, which turns into
> 2845517 bytes after `strip -S'.

Smashing! 2,774,370 bytes!

The script (as it is) has STRIP_DEBUG="${CROSS_COMPILE}strip -S" on the
"make install" command line. I also run configure with:

./configure --disable-docs --host=$HOST \
   STRIP_DEBUG="${CROSS_COMPILE}strip -S"

But that ${CROSS_COMPILE} bit doesn't get propagated. Is `strip`
architecture independent i.e. is it an ELF tool, and can I just
use the x86 one on my build machine?

Otherwise, there seems to be half-baked support for it in configure and
src/racket/Makefile -- could it be fully baked?

> To make the overall size smaller, then it's probably a matter of paring
> down collections to just what you need. If you don't need GUI or
> graphics, then starting with the "textual" distribution might be a good
> starting point:
>
>   racket-textual-5.3.3-src-unix.tgz
>
> We're currently working on a new package system that will let us better
> organize the core and make more useful layers --- but that's very much
> a work in progress.

Can I put in a vote for an "academic" layer and an "enterprise" layer?
That's pretty generalised, I know; and I'm sure that my idea of which is
which is as subjective as anyone's!

>> Also, this is an e500v2 CPU. I heard mutterings about the JIT not working
>> perfectly with "Book E" processors. What is that all about?
>
> No idea. Do these two test sets run ok?:
>
>   collects/tests/racket/optimize.rktl
>   collects/tests/racket/unsafe.rktl

Right, well I did that in the wrong order, didn't I!? After rebuilding
racket-textual, I find that (or rather, don't find) these two tests aren't
in the racket-textual distribution! But... woot! All the tests passed (see
reports below).

At the moment, I can develop scripts/programs on NFS using a racket
installation there (even a full one, at that). As an embedded device,
the target won't have access to this facility. So, f I package something up
with "raco make", do I need the collects (or anything other than racket
and the shared libraries). i.e. will it make a program/module that
contains only the necessary and sufficient?

Regards,

Tim

> collects/tests/racket/optimize.rktl
Performed 7852 expression tests (7826 value expressions, 26 exn 
expressions) and 54 exception field tests.

Passed all tests.
(Other messages report successful tests of error-handling behavior.)

> collects/tests/racket/unsafe.rktl
Performed 873 expression tests (873 value expressions, 0 exn expressions) 
and 0 exception field tests.

Passed all tests.
(Other messages report successful tests of error-handling behavior.)

Posted on the users mailing list.