… | |
… | |
122 | often as necessary. |
122 | often as necessary. |
123 | |
123 | |
124 | =head1 THE F<STATICPERL> SCRIPT |
124 | =head1 THE F<STATICPERL> SCRIPT |
125 | |
125 | |
126 | This module installs a script called F<staticperl> into your perl |
126 | This module installs a script called F<staticperl> into your perl |
127 | binary directory. The script is fully self-contained, and can be used |
127 | binary directory. The script is fully self-contained, and can be |
128 | without perl (for example, in an uClibc chroot environment). In fact, |
128 | used without perl (for example, in an uClibc chroot environment). In |
129 | it can be extracted from the C<App::Staticperl> distribution tarball as |
129 | fact, it can be extracted from the C<App::Staticperl> distribution |
130 | F<bin/staticperl>, without any installation. |
130 | tarball as F<bin/staticperl>, without any installation. The |
|
|
131 | newest (possibly alpha) version can also be downloaded from |
|
|
132 | L<http://staticperl.schmorp.de/staticperl>. |
131 | |
133 | |
132 | F<staticperl> interprets the first argument as a command to execute, |
134 | F<staticperl> interprets the first argument as a command to execute, |
133 | optionally followed by any parameters. |
135 | optionally followed by any parameters. |
134 | |
136 | |
135 | There are two command categories: the "phase 1" commands which deal with |
137 | There are two command categories: the "phase 1" commands which deal with |
… | |
… | |
701 | |
703 | |
702 | More commonly, you would either activate 64 bit integer support |
704 | More commonly, you would either activate 64 bit integer support |
703 | (C<-Duse64bitint>), or disable large files support (-Uuselargefiles), to |
705 | (C<-Duse64bitint>), or disable large files support (-Uuselargefiles), to |
704 | reduce filesize further. |
706 | reduce filesize further. |
705 | |
707 | |
706 | =item C<PERL_CPPFLAGS>, C<PERL_OPTIMIZE>, C<PERL_LDFLAGS>, C<PERL_LIBS> |
708 | =item C<PERL_CC>, C<PERL_CPPFLAGS>, C<PERL_OPTIMIZE>, C<PERL_LDFLAGS>, C<PERL_LIBS> |
707 | |
709 | |
708 | These flags are passed to perl's F<Configure> script, and are generally |
710 | These flags are passed to perl's F<Configure> script, and are generally |
709 | optimised for small size (at the cost of performance). Since they also |
711 | optimised for small size (at the cost of performance). Since they also |
710 | contain subtle workarounds around various build issues, changing these |
712 | contain subtle workarounds around various build issues, changing these |
711 | usually requires understanding their default values - best look at the top |
713 | usually requires understanding their default values - best look at the top |
… | |
… | |
714 | =back |
716 | =back |
715 | |
717 | |
716 | =head4 Variables you probably I<do not want> to override |
718 | =head4 Variables you probably I<do not want> to override |
717 | |
719 | |
718 | =over 4 |
720 | =over 4 |
|
|
721 | |
|
|
722 | =item C<MAKE> |
|
|
723 | |
|
|
724 | The make command to use - default is C<make>. |
719 | |
725 | |
720 | =item C<MKBUNDLE> |
726 | =item C<MKBUNDLE> |
721 | |
727 | |
722 | Where F<staticperl> writes the C<mkbundle> command to |
728 | Where F<staticperl> writes the C<mkbundle> command to |
723 | (default: F<$STATICPERL/mkbundle>). |
729 | (default: F<$STATICPERL/mkbundle>). |
… | |
… | |
1051 | PERL_CONFIGURE="$PERL_CONFIGURE -U$sym" |
1057 | PERL_CONFIGURE="$PERL_CONFIGURE -U$sym" |
1052 | done |
1058 | done |
1053 | } |
1059 | } |
1054 | |
1060 | |
1055 | This mostly gains space when linking staticaly, as the functions will |
1061 | This mostly gains space when linking staticaly, as the functions will |
1056 | liekly not be linked in. The gain for dynamically-linked binaries is |
1062 | likely not be linked in. The gain for dynamically-linked binaries is |
1057 | smaller. |
1063 | smaller. |
1058 | |
1064 | |
1059 | Also, this leaves C<gethostbyname> in - not only is it actually used |
1065 | Also, this leaves C<gethostbyname> in - not only is it actually used |
1060 | often, the L<Socket> module also exposes it, so leaving it out usually |
1066 | often, the L<Socket> module also exposes it, so leaving it out usually |
1061 | gains little. Why Socket exposes a C function that is in the core already |
1067 | gains little. Why Socket exposes a C function that is in the core already |