This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Also add Encode's sub-modules to known_extensions when building statically.
authorNicholas Clark <nick@ccl4.org>
Tue, 18 Jun 2013 10:00:38 +0000 (12:00 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 2 Jul 2013 13:17:00 +0000 (15:17 +0200)
commit08b889303304849ba3ce08a3a08d913862c17156
treeb20127ab0a2277d6868f886c0bf97c6ac43a08f3
parentf7b3892b9e45c6994685c9a625d3ea2b52642167
Also add Encode's sub-modules to known_extensions when building statically.

There is code in Configure to treat Encode specially when it is specified as
a statically linked extension. By default, Encode builds separated shared
objects for each of its subdirectories. This works well with DynaLoader,
and the top level perl Makefile doesn't even notice this, because it doesn't
have to list these libraries as things it links with at compile time.

For a static link, Encode builds a separate *.a file for each of its
subdirectories. The top level Makefile *does* need to know about these, as
a static link requires them all to be listed. Hence the work-around is to
treat Encode as a set of nested modules if linked statically.

We can't do this in Makefile.SH because the various Encode submodules are
installed as separate *.a files in the tree, and so need to continue to be
treated as distinct modules in case ExtUtils::MakeMaker is asked to (re)link
a static perl with an additional extension.

I suspect that the most elegant fix would be to tweak Encode's top level
Makefile.PL to link everything into one *.a if it is building statically.
I'm not sure how to do that, and it would need to be accepted upstream.
Configure