From: Jarkko Hietaniemi Date: Mon, 10 Dec 2001 03:38:20 +0000 (+0000) Subject: Make the whole -lperl thing NetBSD only until we X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ea5fc951afef02e4de7ec4d7a93e8ef289815e8b;p=p5sagit%2Fp5-mst-13.2.git Make the whole -lperl thing NetBSD only until we find some other platform that needs the same. p4raw-id: //depot/perl@13587 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index f04be9c..f2b6ef2 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -1088,12 +1088,6 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists my $ldrun = qq{-rpath "$self->{LD_RUN_PATH}"} if ($^O eq 'irix' && $self->{LD_RUN_PATH}); - my $libs = $self->{LDLOADLIBS}; - - if ($^O eq 'netbsd') { - $libs = '$(LLIBPERL)'; - } - # For example in AIX the shared objects/libraries from previous builds # linger quite a while in the shared dynalinker cache even when nobody # is using them. This is painful if one for instance tries to restart @@ -1102,6 +1096,22 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists push(@m,' $(RM_F) $@ '); + my $libs = $self->{LDLOADLIBS}; + + if ($^O eq 'netbsd') { + # Use nothing on static perl platforms, and to the flags needed + # to link against the shared libperl library on shared perl + # platforms. We peek at lddlflags to see if we need -Wl,-R + # or -R to add paths to the run-time library search path. + if ($Config{'useshrplib'}) { + if ($Config{'lddlflags'} =~ /-Wl,-R/) { + $libs = '-L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -lperl'; + } elsif ($Config{'lddlflags'} =~ /-R/) { + $libs = '-L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -lperl'; + } + } + } + push(@m, ' LD_RUN_PATH="$(LD_RUN_PATH)" $(LD) '.$ldrun.' $(LDDLFLAGS) '.$ldfrom. ' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) '.$libs.' $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST)'); @@ -3215,19 +3225,6 @@ sub realclean { my($self, %attribs) = @_; my(@m); - # Set LLIBPERL to nothing on static perl platforms, and to the flags - # needed to link against the shared libperl library on shared perl - # platforms. We peek at lddlflags to see if we need -Wl,-R or -R - # to add paths to the run-time library search path. - # - my($llibperl) = ''; - if ($Config{'useshrplib'}) { - if ($Config{'lddlflags'} =~ /-Wl,-R/) { - $llibperl = '-L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -lperl'; - } elsif ($Config{'lddlflags'} =~ /-R/) { - $llibperl = '-L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -lperl'; - } - } push(@m,'LLIBPERL = '.$llibperl."\n"); push(@m,'