chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Statically Linking Eggs


From: Evan Hanson
Subject: Re: [Chicken-users] Statically Linking Eggs
Date: Mon, 18 May 2015 18:04:54 +1200

Hi Nick,

On 2015-05-11 13:31, Nick Andryshak wrote:
> But can you statically link Eggs anymore? There's like 40 files in the
> deployment folder after deploying only one extension, I'd like a single,
> static executable. Is this possible?

It's possible if all of the eggs you need to use provide suitable object
files for static compilation, but this is not currently supported in any
meaningful way by the toolchain and it's unlikely to be possible for all
of those 40 files you're trying to use.

The sysexits egg is a very simple example of an extension that provides
an object file for static linking:

    $ cat foo.scm
    (import sysexits)
    (exit exit/ok)
    $ chicken-status -f sysexits
    /usr/local/lib/chicken/7/sysexits.import.so
    /usr/local/lib/chicken/7/sysexits.o
    /usr/local/lib/chicken/7/sysexits.so
    $ csc -static -uses sysexits foo.scm /usr/local/lib/chicken/7/sysexits.o
    $ ./foo

However, this practice is not widespread.

Evan



reply via email to

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