diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-07-29 13:37:42 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-08-01 11:53:56 +0200 |
commit | 9661ac31cea34697b5b3481463c4f97203d2d572 (patch) | |
tree | 45245429cbbb9661e8cf81866eec67918fa68676 /makedef.pl | |
parent | 3cf3941efbe7151eded0f3d115e71a544defdf77 (diff) | |
download | perl-9661ac31cea34697b5b3481463c4f97203d2d572.tar.gz |
In makedef.pl, export boot_* for static modules only on Win32 and WinCE.
The code as-is will only be run on Win32 and WinCE, because currently the
code to populate $static_ext is only run on Win32 and WinCE. As-is this code
can't be run on all platforms, because currently *nix (ie AIX) links static
extensions into the perl executable, rather than into the shared perl
library. Hence boot_* functions for static extensions aren't in the shared
perl library, so it would be an error to attempt to export them from it.
Diffstat (limited to 'makedef.pl')
-rw-r--r-- | makedef.pl | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/makedef.pl b/makedef.pl index 688a3043d5..f84c009cc9 100644 --- a/makedef.pl +++ b/makedef.pl @@ -1255,11 +1255,23 @@ elsif ($PLATFORM eq 'netware') { )); } -# records of type boot_module for statically linked modules (except Dynaloader) -$static_ext =~ s/\//__/g; -$static_ext =~ s/\bDynaLoader\b//; -try_symbols(map {"boot_$_"} grep {/\S/} split /\s+/, $static_ext); -try_symbols("init_Win32CORE") if $static_ext =~ /\bWin32CORE\b/; +# When added this code was only run for Win32 and WinCE +# Currently only Win32 links static extensions into the shared library. +# The WinCE makefile doesn't appear to support static extensions, so this code +# can't have any effect there. +# The NetWare Makefile doesn't support static extensions (and hardcodes the +# list of dynamic extensions, and the rules to build them) +# For *nix (and presumably OS/2) with a shared libperl, Makefile.SH compiles +# static extensions with -fPIC, but links them to perl, not libperl.so +# The VMS build scripts don't yet implement static extensions at all. + +if ($PLATFORM =~ /^win(?:32|ce)$/) { + # records of type boot_module for statically linked modules (except Dynaloader) + $static_ext =~ s/\//__/g; + $static_ext =~ s/\bDynaLoader\b//; + try_symbols(map {"boot_$_"} grep {/\S/} split /\s+/, $static_ext); + try_symbols("init_Win32CORE") if $static_ext =~ /\bWin32CORE\b/; +} if ($PLATFORM eq 'os2') { my (%mapped, @missing); |