--- App-Staticperl/staticperl.pod 2011/07/13 17:47:40 1.50 +++ App-Staticperl/staticperl.pod 2012/06/25 11:37:15 1.56 @@ -1,6 +1,6 @@ =head1 NAME -staticperl - perl, libc, 100 modules, all in one 500kb file +staticperl - perl, libc, 100 modules, all in one standalone 500kb file =head1 SYNOPSIS @@ -350,7 +350,7 @@ All options that specify modules or files to be added are processed in the order given on the command line. -=head3 BUNDLE CREATION WORKFLOW / STATICPELR MKBUNDLE OPTIONS +=head3 BUNDLE CREATION WORKFLOW / STATICPERL MKBUNDLE OPTIONS F works by first assembling a list of candidate files and modules to include, then filtering them by include/exclude @@ -545,7 +545,7 @@ require myfiles::file2; my $res = do "myfiles/file3.pl"; -=item C<--binadd> F | C<--add> "F alias" +=item C<--binadd> F | C<--binadd> "F alias" Just like C<--add>, except that it treats the file as binary and adds it without any postprocessing (perl files might get stripped to reduce their @@ -754,7 +754,7 @@ Specifically, these are removed: -C and C can cause underaible +C and C can cause undesirable output, C, C, C and C can alter execution significantly, and C, C and C can affect input and output. @@ -951,10 +951,23 @@ Most of the variables override (or modify) the corresponding F variable, except C, which gets appended. -You should have a look near the beginning of the F script - -staticperl tries to default C to some psace-saving options -suitable for newer gcc versions. For other compilers or older versions you -need to adjust these, for example, in your F<~/.staticperlrc>. +The default for C is C<-Os> (assuming gcc), and for +C is C<-lm -lcrypt>, which should be good for most (but not +all) systems. + +For other compilers or more customised optimisation settings, you need to +adjust these, e.g. in your F<~/.staticperlrc>. + +With gcc on x86 and amd64, you can get more space-savings by using: + + -Os -ffunction-sections -fdata-sections -finline-limit=8 -mpush-args + -mno-inline-stringops-dynamically -mno-align-stringops + +And on x86 and pentium3 and newer (basically everything you might ever +want to run on), adding these is even better for space-savings (use +-mtune=core2 or something newer for much faster code, too): + + -fomit-frame-pointer -march=pentium3 -mtune=i386 =back @@ -1343,6 +1356,28 @@ See Pango, same problems, same solution. +=item Net::SSLeay + +This module hasn't been significantly updated since OpenSSL is called +OpenSSL, and fails to properly link against dependent libraries, most +commonly, it forgets to specify -ldl when linking. + +On GNU/Linux systems this usually goes undetected, as perl usually links +against -ldl itself and OpenSSL just happens to pick it up that way, by +chance. + +For static builds, you either have to configure -ldl manually, or you +cna use the following snippet in your C hook which patches +Net::SSLeay after installation, which happens to work most of the time: + + postinstall() { + # first install it + instcpan Net::SSLeay + # then add -ldl for future linking + chmod u+w "$PERL_PREFIX"/lib/auto/Net/SSLeay/extralibs.ld + echo " -ldl" >>"$PERL_PREFIX"/lib/auto/Net/SSLeay/extralibs.ld + } + =item Pango In addition to the C problem in Glib, Pango also routes around