ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/App-Staticperl/staticperl.pod
(Generate patch)

Comparing App-Staticperl/staticperl.pod (file contents):
Revision 1.49 by root, Wed Jul 13 15:23:13 2011 UTC vs.
Revision 1.54 by root, Sat Mar 3 07:39:32 2012 UTC

1=head1 NAME 1=head1 NAME
2 2
3staticperl - perl, libc, 100 modules, all in one 500kb file 3staticperl - perl, libc, 100 modules, all in one standalone 500kb file
4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 staticperl help # print the embedded documentation 7 staticperl help # print the embedded documentation
8 staticperl fetch # fetch and unpack perl sources 8 staticperl fetch # fetch and unpack perl sources
11 staticperl install # build and then install perl 11 staticperl install # build and then install perl
12 staticperl clean # clean most intermediate files (restart at configure) 12 staticperl clean # clean most intermediate files (restart at configure)
13 staticperl distclean # delete everything installed by this script 13 staticperl distclean # delete everything installed by this script
14 staticperl perl ... # invoke the perlinterpreter 14 staticperl perl ... # invoke the perlinterpreter
15 staticperl cpan # invoke CPAN shell 15 staticperl cpan # invoke CPAN shell
16 staticperl instmod path... # install unpacked modules 16 staticperl instsrc path... # install unpacked modules
17 staticperl instcpan modulename... # install modules from CPAN 17 staticperl instcpan modulename... # install modules from CPAN
18 staticperl mkbundle <bundle-args...> # see documentation 18 staticperl mkbundle <bundle-args...> # see documentation
19 staticperl mkperl <bundle-args...> # see documentation 19 staticperl mkperl <bundle-args...> # see documentation
20 staticperl mkapp appname <bundle-args...> # see documentation 20 staticperl mkapp appname <bundle-args...> # see documentation
21 21
348 add eg/httpd httpd.pm 348 add eg/httpd httpd.pm
349 349
350All options that specify modules or files to be added are processed in the 350All options that specify modules or files to be added are processed in the
351order given on the command line. 351order given on the command line.
352 352
353=head3 BUNDLE CREATION WORKFLOW / STATICPELR MKBUNDLE OPTIONS 353=head3 BUNDLE CREATION WORKFLOW / STATICPERL MKBUNDLE OPTIONS
354 354
355F<staticperl mkbundle> works by first assembling a list of candidate 355F<staticperl mkbundle> works by first assembling a list of candidate
356files and modules to include, then filtering them by include/exclude 356files and modules to include, then filtering them by include/exclude
357patterns. The remaining modules (together with their direct dependencies, 357patterns. The remaining modules (together with their direct dependencies,
358such as link libraries and L<AutoLoader> files) are then converted into 358such as link libraries and L<AutoLoader> files) are then converted into
752standalone applications, and this option removes those known to cause 752standalone applications, and this option removes those known to cause
753trouble. 753trouble.
754 754
755Specifically, these are removed: 755Specifically, these are removed:
756 756
757C<PERL_HASH_SEED_DEBUG> and C<PERL_DEBUG_MSTATS> can cause underaible 757C<PERL_HASH_SEED_DEBUG> and C<PERL_DEBUG_MSTATS> can cause undesirable
758output, C<PERL5OPT>, C<PERL_DESTRUCT_LEVEL>, C<PERL_HASH_SEED> and 758output, C<PERL5OPT>, C<PERL_DESTRUCT_LEVEL>, C<PERL_HASH_SEED> and
759C<PERL_SIGNALS> can alter execution significantly, and C<PERL_UNICODE>, 759C<PERL_SIGNALS> can alter execution significantly, and C<PERL_UNICODE>,
760C<PERLIO_DEBUG> and C<PERLIO> can affect input and output. 760C<PERLIO_DEBUG> and C<PERLIO> can affect input and output.
761 761
762The variables C<PERL_LIB> and C<PERL5_LIB> are always ignored because the 762The variables C<PERL_LIB> and C<PERL5_LIB> are always ignored because the
949F<~/.staticperlrc> to override them. 949F<~/.staticperlrc> to override them.
950 950
951Most of the variables override (or modify) the corresponding F<Configure> 951Most of the variables override (or modify) the corresponding F<Configure>
952variable, except C<PERL_CCFLAGS>, which gets appended. 952variable, except C<PERL_CCFLAGS>, which gets appended.
953 953
954You should have a look near the beginning of the F<staticperl> script - 954The default for C<PERL_OPTIMIZE> is C<-Os> (assuming gcc), and for
955staticperl tries to default C<PERL_OPTIMIZE> to some psace-saving options 955C<PERL_LIBS> is C<-lm -lcrypt>, which should be good for most (but not
956suitable for newer gcc versions. For other compilers or older versions you 956all) systems.
957
958For other compilers or more customised optimisation settings, you need to
957need to adjust these, for example, in your F<~/.staticperlrc>. 959adjust these, e.g. in your F<~/.staticperlrc>.
960
961With gcc on x86 and amd64, you can get more space-savings by using:
962
963 -Os -ffunction-sections -fdata-sections -finline-limit=8 -mpush-args
964 -mno-inline-stringops-dynamically -mno-align-stringops
965
966And on x86 and pentium3 and newer (basically everything you might ever
967want to run on), adding these is even better for space-savings (use
968-mtune=core2 or something newer for much faster code, too):
969
970 -fomit-frame-pointer -march=pentium3 -mtune=i386
958 971
959=back 972=back
960 973
961=head4 Variables you probably I<do not want> to override 974=head4 Variables you probably I<do not want> to override
962 975

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines