… | |
… | |
383 | # specification file |
383 | # specification file |
384 | add file1 myfiles/file1 |
384 | add file1 myfiles/file1 |
385 | add file2 myfiles/file2 |
385 | add file2 myfiles/file2 |
386 | add file3 myfiles/file3 |
386 | add file3 myfiles/file3 |
387 | |
387 | |
|
|
388 | =item --binadd "file" | --add "file alias" |
|
|
389 | |
|
|
390 | Just like C<--add>, except that it treats the file as binary and adds it |
|
|
391 | without any processing. |
|
|
392 | |
|
|
393 | You should probably add a C</> prefix to avoid clashing with embedded |
|
|
394 | perl files (whose paths do not start with C</>), and/or use a special |
|
|
395 | directory, such as C</res/name>. |
|
|
396 | |
|
|
397 | You can later get a copy of these files by calling C<staticperl::find |
|
|
398 | "alias">. |
|
|
399 | |
388 | =item --static |
400 | =item --static |
389 | |
401 | |
390 | When C<--perl> is also given, link statically instead of dynamically. The |
402 | When C<--perl> is also given, link statically instead of dynamically. The |
391 | default is to link the new perl interpreter fully dynamic (that means all |
403 | default is to link the new perl interpreter fully dynamic (that means all |
392 | perl modules are linked statically, but all external libraries are still |
404 | perl modules are linked statically, but all external libraries are still |
… | |
… | |
472 | |
484 | |
473 | =item C<PREFIX> |
485 | =item C<PREFIX> |
474 | |
486 | |
475 | The prefix where perl gets installed (default: F<$STATICPERL/perl>), |
487 | The prefix where perl gets installed (default: F<$STATICPERL/perl>), |
476 | i.e. where the F<bin> and F<lib> subdirectories will end up. |
488 | i.e. where the F<bin> and F<lib> subdirectories will end up. |
|
|
489 | |
|
|
490 | =item C<PERL_CONFIGURE> |
|
|
491 | |
|
|
492 | Additional Configure options - these are simply passed to the perl |
|
|
493 | Configure script. For example, if you wanted to enable dynamic loading, |
|
|
494 | you could pass C<-Dusedl>. To enable ithreads (Why would you want that |
|
|
495 | insanity? Don't! Use L<forks> instead!) you would pass C<-Duseithreads> |
|
|
496 | and so on. |
|
|
497 | |
|
|
498 | More commonly, you would either activate 64 bit integer support |
|
|
499 | (C<-Duse64bitint>), or disable large files support (-Uuselargefiles), to |
|
|
500 | reduce filesize further. |
477 | |
501 | |
478 | =item C<PERL_CPPFLAGS>, C<PERL_OPTIMIZE>, C<PERL_LDFLAGS>, C<PERL_LIBS> |
502 | =item C<PERL_CPPFLAGS>, C<PERL_OPTIMIZE>, C<PERL_LDFLAGS>, C<PERL_LIBS> |
479 | |
503 | |
480 | These flags are passed to perl's F<Configure> script, and are generally |
504 | These flags are passed to perl's F<Configure> script, and are generally |
481 | optimised for small size (at the cost of performance). Since they also |
505 | optimised for small size (at the cost of performance). Since they also |
… | |
… | |
654 | |
678 | |
655 | =back |
679 | =back |
656 | |
680 | |
657 | =head1 FULLY STATIC BINARIES - BUILDROOT |
681 | =head1 FULLY STATIC BINARIES - BUILDROOT |
658 | |
682 | |
659 | To make truly static (linux-) libraries, you might want to have a look at |
683 | To make truly static (Linux-) libraries, you might want to have a look at |
660 | buildroot (L<http://buildroot.uclibc.org/>). |
684 | buildroot (L<http://buildroot.uclibc.org/>). |
661 | |
685 | |
662 | Buildroot is primarily meant to set up a cross-compile environment (which |
686 | Buildroot is primarily meant to set up a cross-compile environment (which |
663 | is not so useful as perl doesn't quite like cross compiles), but it can also compile |
687 | is not so useful as perl doesn't quite like cross compiles), but it can also compile |
664 | a chroot environment where you can use F<staticperl>. |
688 | a chroot environment where you can use F<staticperl>. |
… | |
… | |
678 | uClibc newer than 0.9.31 (at the time of this writing, I used the 20101201 |
702 | uClibc newer than 0.9.31 (at the time of this writing, I used the 20101201 |
679 | snapshot) and enable NPTL, otherwise Coro needs to be configured with the |
703 | snapshot) and enable NPTL, otherwise Coro needs to be configured with the |
680 | ultra-slow pthreads backend to work around linuxthreads bugs (it also uses |
704 | ultra-slow pthreads backend to work around linuxthreads bugs (it also uses |
681 | twice the address space needed for stacks). |
705 | twice the address space needed for stacks). |
682 | |
706 | |
|
|
707 | If you use C<linuxthreads.old>, then you should also be aware that |
|
|
708 | uClibc shares C<errno> between all threads when statically linking. See |
|
|
709 | L<http://lists.uclibc.org/pipermail/uclibc/2010-June/044157.html> for a |
|
|
710 | workaround (And L<https://bugs.uclibc.org/2089> for discussion). |
|
|
711 | |
683 | C<ccache> support is also recommended, especially if you want to |
712 | C<ccache> support is also recommended, especially if you want to |
684 | play around with buildroot options. Enabling the C<miniperl> package |
713 | play around with buildroot options. Enabling the C<miniperl> package |
685 | will probably enable all options required for a successful perl |
714 | will probably enable all options required for a successful perl |
686 | build. F<staticperl> itself additionally needs either C<wget> or C<curl>. |
715 | build. F<staticperl> itself additionally needs either C<wget> or C<curl>. |
687 | |
716 | |