… | |
… | |
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 |
… | |
… | |
1051 | PERL_CONFIGURE="$PERL_CONFIGURE -U$sym" |
1053 | PERL_CONFIGURE="$PERL_CONFIGURE -U$sym" |
1052 | done |
1054 | done |
1053 | } |
1055 | } |
1054 | |
1056 | |
1055 | This mostly gains space when linking staticaly, as the functions will |
1057 | This mostly gains space when linking staticaly, as the functions will |
1056 | liekly not be linked in. The gain for dynamically-linked binaries is |
1058 | likely not be linked in. The gain for dynamically-linked binaries is |
1057 | smaller. |
1059 | smaller. |
1058 | |
1060 | |
1059 | Also, this leaves C<gethostbyname> in - not only is it actually used |
1061 | 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 |
1062 | 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 |
1063 | gains little. Why Socket exposes a C function that is in the core already |