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.40 by root, Sun May 1 09:29:47 2011 UTC vs.
Revision 1.41 by root, Thu May 19 18:58:19 2011 UTC

39file that contains perl interpreter, libc, all the modules you need, all 39file that contains perl interpreter, libc, all the modules you need, all
40the libraries you need and of course your actual program. 40the libraries you need and of course your actual program.
41 41
42With F<uClibc> and F<upx> on x86, you can create a single 500kb binary 42With F<uClibc> and F<upx> on x86, you can create a single 500kb binary
43that contains perl and 100 modules such as POSIX, AnyEvent, EV, IO::AIO, 43that contains perl and 100 modules such as POSIX, AnyEvent, EV, IO::AIO,
44Coro and so on. Or any other choice of modules. 44Coro and so on. Or any other choice of modules (and some other size :).
45 45
46To see how this turns out, you can try out smallperl and bigperl, two 46To see how this turns out, you can try out smallperl and bigperl, two
47pre-built static and compressed perl binaries with many and even more 47pre-built static and compressed perl binaries with many and even more
48modules: just follow the links at L<http://staticperl.schmorp.de/>. 48modules: just follow the links at L<http://staticperl.schmorp.de/>.
49 49
1155good experiences with GCC 4.4.x but not GCC 4.5. 1155good experiences with GCC 4.4.x but not GCC 4.5.
1156 1156
1157To minimise code size, I used C<-pipe -ffunction-sections -fdata-sections 1157To minimise code size, I used C<-pipe -ffunction-sections -fdata-sections
1158-finline-limit=8 -fno-builtin-strlen -mtune=i386>. The C<-mtune=i386> 1158-finline-limit=8 -fno-builtin-strlen -mtune=i386>. The C<-mtune=i386>
1159doesn't decrease codesize much, but it makes the file much more 1159doesn't decrease codesize much, but it makes the file much more
1160compressible. 1160compressible (and the execution a lot slower...).
1161 1161
1162If you don't need Coro or threads, you can go with "linuxthreads.old" (or 1162If you don't need Coro or threads, you can go with "linuxthreads.old" (or
1163no thread support). For Coro, it is highly recommended to switch to a 1163no thread support). For Coro, it is highly recommended to switch to a
1164uClibc newer than 0.9.31 (at the time of this writing, I used the 20101201 1164uClibc newer than 0.9.31 (at the time of this writing, I used the 20101201
1165snapshot) and enable NPTL, otherwise Coro needs to be configured with the 1165snapshot) and enable NPTL, otherwise Coro needs to be configured with the

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines