On Mon, 11 Feb 2002, Jerry Beckmann wrote:
> using perl xs can I statically link the library?

If your Makefile.PL uses:

  'LINKTYPE' => 'static'
  'MAP_TARGET' => 'xperl'

then after the normal incantation of "make", you can run
a "make xperl". The xperl binary will be statically linked
with the module -- it is not dynaloaded. If you are
careful while building perl and the modules you need, you
can build a completely stand-alone perl binary that has
everything linked statically. If you are *really* crazy,
you can statically link a module to provide @INC searching
of statically embedded Perl source too. Marketing types
love shipping a single executable file. (Mind that it
won't fit on a floppy these days. Barely make it onto a
CD depending on the modules you need... ;)

Bart Schuller writes:
> And depending on the platform this will either
> - Work, but not share code (that is, the code will be dynamically
>   loadable, but not shared if several processes do it at the same time).
>   Linux on i386 works like this.

Really? Are you sure? The last time I remember using manual
code loading into a malloc'ed region was about 10 years ago.
Boy, that brings back some ugly ld memories...

- Ken

Reply via email to