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.20 by root, Fri Dec 10 20:29:17 2010 UTC vs.
Revision 1.24 by root, Wed Dec 15 00:17:47 2010 UTC

122often as necessary. 122often as necessary.
123 123
124=head1 THE F<STATICPERL> SCRIPT 124=head1 THE F<STATICPERL> SCRIPT
125 125
126This module installs a script called F<staticperl> into your perl 126This module installs a script called F<staticperl> into your perl
127binary directory. The script is fully self-contained, and can be used 127binary directory. The script is fully self-contained, and can be
128without perl (for example, in an uClibc chroot environment). In fact, 128used without perl (for example, in an uClibc chroot environment). In
129it can be extracted from the C<App::Staticperl> distribution tarball as 129fact, it can be extracted from the C<App::Staticperl> distribution
130F<bin/staticperl>, without any installation. 130tarball as F<bin/staticperl>, without any installation. The
131newest (possibly alpha) version can also be downloaded from
132L<http://staticperl.schmorp.de/staticperl>.
131 133
132F<staticperl> interprets the first argument as a command to execute, 134F<staticperl> interprets the first argument as a command to execute,
133optionally followed by any parameters. 135optionally followed by any parameters.
134 136
135There are two command categories: the "phase 1" commands which deal with 137There are two command categories: the "phase 1" commands which deal with
145 147
146The command 148The command
147 149
148 staticperl install 150 staticperl install
149 151
150Is normally all you need: It installs the perl interpreter in 152is normally all you need: It installs the perl interpreter in
151F<~/.staticperl/perl>. It downloads, configures, builds and installs the 153F<~/.staticperl/perl>. It downloads, configures, builds and installs the
152perl interpreter if required. 154perl interpreter if required.
153 155
154Most of the following commands simply run one or more steps of this 156Most of the following F<staticperl> subcommands simply run one or more
155sequence. 157steps of this sequence.
158
159If it fails, then most commonly because the compiler options I selected
160are not supported by your compiler - either edit the F<staticperl> script
161yourself or create F<~/.staticperl> shell script where your set working
162C<PERL_CCFLAGS> etc. variables.
156 163
157To force recompilation or reinstallation, you need to run F<staticperl 164To force recompilation or reinstallation, you need to run F<staticperl
158distclean> first. 165distclean> first.
159 166
160=over 4 167=over 4
207 214
208=item F<staticperl clean> 215=item F<staticperl clean>
209 216
210Deletes the perl source directory (and potentially cleans up other 217Deletes the perl source directory (and potentially cleans up other
211intermediate files). This can be used to clean up files only needed for 218intermediate files). This can be used to clean up files only needed for
212building perl, without removing the installed perl interpreter, or to 219building perl, without removing the installed perl interpreter.
213force a re-build from scratch.
214 220
215At the moment, it doesn't delete downloaded tarballs. 221At the moment, it doesn't delete downloaded tarballs.
222
223The exact semantics of this command will probably change.
216 224
217=item F<staticperl distclean> 225=item F<staticperl distclean>
218 226
219This wipes your complete F<~/.staticperl> directory. Be careful with this, 227This wipes your complete F<~/.staticperl> directory. Be careful with this,
220it nukes your perl download, perl sources, perl distribution and any 228it nukes your perl download, perl sources, perl distribution and any
701 709
702More commonly, you would either activate 64 bit integer support 710More commonly, you would either activate 64 bit integer support
703(C<-Duse64bitint>), or disable large files support (-Uuselargefiles), to 711(C<-Duse64bitint>), or disable large files support (-Uuselargefiles), to
704reduce filesize further. 712reduce filesize further.
705 713
706=item C<PERL_CPPFLAGS>, C<PERL_OPTIMIZE>, C<PERL_LDFLAGS>, C<PERL_LIBS> 714=item C<PERL_CC>, C<PERL_CCFLAGS>, C<PERL_OPTIMIZE>, C<PERL_LDFLAGS>, C<PERL_LIBS>
707 715
708These flags are passed to perl's F<Configure> script, and are generally 716These flags are passed to perl's F<Configure> script, and are generally
709optimised for small size (at the cost of performance). Since they also 717optimised for small size (at the cost of performance). Since they also
710contain subtle workarounds around various build issues, changing these 718contain subtle workarounds around various build issues, changing these
711usually requires understanding their default values - best look at the top 719usually requires understanding their default values - best look at
712of the F<staticperl> script for more info on these. 720the top of the F<staticperl> script for more info on these, and use a
721F<~/.staticperlrc> to override them.
722
723Most of the variables override (or modify) the corresponding F<Configure>
724variable, except C<PERL_CCFLAGS>, which gets appended.
713 725
714=back 726=back
715 727
716=head4 Variables you probably I<do not want> to override 728=head4 Variables you probably I<do not want> to override
717 729
718=over 4 730=over 4
731
732=item C<MAKE>
733
734The make command to use - default is C<make>.
719 735
720=item C<MKBUNDLE> 736=item C<MKBUNDLE>
721 737
722Where F<staticperl> writes the C<mkbundle> command to 738Where F<staticperl> writes the C<mkbundle> command to
723(default: F<$STATICPERL/mkbundle>). 739(default: F<$STATICPERL/mkbundle>).
1051 PERL_CONFIGURE="$PERL_CONFIGURE -U$sym" 1067 PERL_CONFIGURE="$PERL_CONFIGURE -U$sym"
1052 done 1068 done
1053 } 1069 }
1054 1070
1055This mostly gains space when linking staticaly, as the functions will 1071This mostly gains space when linking staticaly, as the functions will
1056liekly not be linked in. The gain for dynamically-linked binaries is 1072likely not be linked in. The gain for dynamically-linked binaries is
1057smaller. 1073smaller.
1058 1074
1059Also, this leaves C<gethostbyname> in - not only is it actually used 1075Also, this leaves C<gethostbyname> in - not only is it actually used
1060often, the L<Socket> module also exposes it, so leaving it out usually 1076often, the L<Socket> module also exposes it, so leaving it out usually
1061gains little. Why Socket exposes a C function that is in the core already 1077gains little. Why Socket exposes a C function that is in the core already

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines