summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/MM_Win32.pm
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2007-05-16 08:26:09 +0000
committerSteve Hay <SteveHay@planit.com>2007-05-16 08:26:09 +0000
commit8b503b1a8d84e235d4f8455dd10d4d928b5a89e1 (patch)
tree93e30c0a42f35352cf6b1e9aa3032c50ebdd7557 /lib/ExtUtils/MM_Win32.pm
parent2b1c14c1f96536fa0d2dde60586587f982d6db5d (diff)
downloadperl-8b503b1a8d84e235d4f8455dd10d4d928b5a89e1.tar.gz
A more general fix to non-threaded static extension build problems
than #31220 was. p4raw-id: //depot/perl@31229
Diffstat (limited to 'lib/ExtUtils/MM_Win32.pm')
-rw-r--r--lib/ExtUtils/MM_Win32.pm28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm
index 75d01cac3b..a78bc6c411 100644
--- a/lib/ExtUtils/MM_Win32.pm
+++ b/lib/ExtUtils/MM_Win32.pm
@@ -534,6 +534,34 @@ sub os_flavor {
}
+=item cflags
+
+Defines the PERLDLL symbol if we are configured for static building since all
+code destined for the perl5xx.dll must be compiled with the PERLDLL symbol
+defined.
+
+=cut
+
+sub cflags {
+ my($self,$libperl)=@_;
+ return $self->{CFLAGS} if $self->{CFLAGS};
+ return '' unless $self->needs_linking();
+
+ my $base = $self->SUPER::cflags($libperl);
+ foreach (split /\n/, $base) {
+ /^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
+ };
+ $self->{CCFLAGS} .= " -DPERLDLL" if ($self->{LINKTYPE} eq 'static');
+
+ return $self->{CFLAGS} = qq{
+CCFLAGS = $self->{CCFLAGS}
+OPTIMIZE = $self->{OPTIMIZE}
+PERLTYPE = $self->{PERLTYPE}
+};
+
+}
+
+
1;
__END__