diff options
author | Benjamin Stuhl <sho_pi@hotmail.com> | 1999-11-18 10:45:27 -0800 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-05 11:07:37 +0000 |
commit | 7a958ec31151f9d03a26dcab8abdf5c57315dc96 (patch) | |
tree | bf0c1582733a01b04dc1e389cf32286fba918631 /lib | |
parent | 878143fbd9fc1c2bef489be4fd428b8d222cc108 (diff) | |
download | perl-7a958ec31151f9d03a26dcab8abdf5c57315dc96.tar.gz |
applied somewhat modified version of suggested patch
Message-ID: <19991119024527.72749.qmail@hotmail.com>
Subject: [PATCH 5.005_62] Perl on Win95, Mark IIB
p4raw-id: //depot/perl@4653
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/MM_Unix.pm | 3 | ||||
-rw-r--r-- | lib/ExtUtils/MM_Win32.pm | 27 |
2 files changed, 25 insertions, 5 deletions
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index f9fdcaaf58..4a07185ef5 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -3233,11 +3233,14 @@ sub subdir_x { my($self, $subdir) = @_; my(@m); if ($Is_Win32 && Win32::IsWin95()) { + # XXX: dmake-specific, like rest of Win95 port return <<EOT; subdirs :: +@[ cd $subdir \$(MAKE) all \$(PASTHRU) cd .. +] EOT } else { diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index e1cb83ba80..ab8570d702 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -37,9 +37,14 @@ $PERLMAKE = 1 if $Config{'make'} =~ /^pmake/i; $OBJ = 1 if $Config{'ccflags'} =~ /PERL_OBJECT/i; # a few workarounds for command.com (very basic) -if (Win32::IsWin95()) { +{ package ExtUtils::MM_Win95; - unshift @MM::ISA, 'ExtUtils::MM_Win95'; + + # the $^O test may be overkill, but we want to be sure Win32::IsWin95() + # exists before we try it + + unshift @MM::ISA, 'ExtUtils::MM_Win95' + if ($^O =~ /Win32/ && Win32::IsWin95()); sub xs_c { my($self) = shift; @@ -65,8 +70,6 @@ if (Win32::IsWin95()) { sub xs_o { my($self) = shift; return '' unless $self->needs_linking(); - # Dmake gets confused with 2 ways of making things - return '' if $ExtUtils::MM_Win32::DMAKE; ' .xs$(OBJ_EXT): $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) \\ @@ -74,7 +77,7 @@ if (Win32::IsWin95()) { $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c '; } -} +} # end of command.com workarounds sub dlsyms { my($self,%attribs) = @_; @@ -481,6 +484,20 @@ sub dynamic_lib { my($inst_dynamic_dep) = $attribs{INST_DYNAMIC_DEP} || ""; my($ldfrom) = '$(LDFROM)'; my(@m); + +# several things for GCC/Mingw32: +# 1. use correct CRT startup objects (possibly unnecessary) +# 2. try to overcome non-relocateable-DLL problems by generating +# a (hopefully unique) image-base from the dll's name +# -- BKS, 10-19-1999 + if ($GCC) { + $otherldflags .= ' -L$(PERL_ARCHIVE:d) -nostdlib $(PERL_ARCHIVE:d)gdllcrt0.o '; + my $dllname = $self->{BASEEXT} . "." . $self->{DLEXT}; + $dllname =~ /(....)(.{0,4})/; + my $baseaddr = unpack("n", $1 ^ $2); + $otherldflags .= sprintf("-Wl,--image-base,0x%x0000 ", $baseaddr); + } + push(@m,' # This section creates the dynamically loadable $(INST_DYNAMIC) # from $(OBJECT) and possibly $(MYEXTLIB). |