Sandro Magi | 12 Aug 15:14 2002
Picon

calling native compiler?

Maybe I'm just an idiot, but I haven't been able to find a way to invoke the 
native code compiler to generate stand-alone native executables. There is no 
reference anywhere in the mailing lists, the manual, the documentation, the 
website or CLiki. 

How do you invoke the native code compiler? Thanks.

Sincerely,
Sandro

--

-- 
"Let us endeavor so to live that when we come to die even the undertaker will 
be sorry."
~ Mark Twain ~

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Hannah Schroeter | 14 Aug 16:02 2002
Picon

Re: calling native compiler?

Hello!

On Mon, Aug 12, 2002 at 09:14:08AM -0400, Sandro Magi wrote:
>Maybe I'm just an idiot, but I haven't been able to find a way to invoke the 
>native code compiler to generate stand-alone native executables. There is no 
>reference anywhere in the mailing lists, the manual, the documentation, the 
>website or CLiki. 

>How do you invoke the native code compiler? Thanks.

You must differentiate two things: native code and standalone code.
SBCL always compiles to native code, newer versions even implicitly
(i.e. when you #'load a .lisp source w/o file compiling it before,
or when typing in forms in the REPL). However, there's no way
to generate standalone code (i.e. a self-contained program where
you don't need the sbcl runtime binary to run).

However, "standalone"-ness isn't really a black or white property
anyway. Usually, C programs need other files to run too (things like
ld.so and the shared C standard library). So the difference is
more gradual: the sbcl runtime is installed on less machines, and
it uses a different mechanism to start up (i.e. you must do more
things manually or in a wrapper script).

The best thing to do is to use #'sb-ext:save-lisp-and-die (use
#'describe to view its documentation) to dump a core with your
application code inside, using :toplevel to specify your main
function to run. Then build a small wrapper shell script of the
form

(Continue reading)


Gmane