From: Jarkko Hietaniemi Date: Sat, 20 Sep 2003 18:44:07 +0000 (+0000) Subject: Retract #21273, #21264, and #21263 as requested by Schwern. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=60537fc0fb46c1b1fbdabe01b4de45ea60c5b753;p=p5sagit%2Fp5-mst-13.2.git Retract #21273, #21264, and #21263 as requested by Schwern. (The real bug was mp2 being too "friendly" with MM innards.) p4raw-id: //depot/perl@21292 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 12ee1d6..3821a35 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -1886,19 +1886,17 @@ usually solves this kind of problem. =item init_others -Initializes EXTRALIBS, BSLOADLIBS, LDLOADLIBS, LIBS, LD_RUN_PATH, +Initializes EXTRALIBS, BSLOADLIBS, LDLOADLIBS, LIBS, LD_RUN_PATH, LD, OBJECT, BOOTDEP, PERLMAINCC, LDFROM, LINKTYPE, SHELL, NOOP, FIRST_MAKEFILE, MAKEFILE_OLD, NOECHO, RM_F, RM_RF, TEST_F, TOUCH, CP, MV, CHMOD, UMASK_NULL, ECHO, ECHO_N -LD is initialized in init_linker() - =cut sub init_others { # --- Initialize Other Attributes my($self) = shift; - + $self->{LD} ||= 'ld'; # Compute EXTRALIBS, BSLOADLIBS and LDLOADLIBS from $self->{LIBS} # Lets look at $self->{LIBS} carefully: It may be an anon array, a string or @@ -2239,14 +2237,10 @@ sub init_INSTALL { Unix has no need of special linker flags. -However this does initialize the default linker if it has not already been set. It uses -the value from Config and then falls back to 'ld' - =cut sub init_linker { my($self) = shift; - $self->{LD} ||= $Config{ld} || 'ld'; $self->{PERL_ARCHIVE} ||= ''; $self->{PERL_ARCHIVE_AFTER} ||= ''; $self->{EXPORT_LIST} ||= ''; diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index be9538e..8fe0b96 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -155,8 +155,8 @@ sub init_DIRFILESEP { Override some of the Unix specific commands with portable ExtUtils::Command ones. -Also provide a default for AR in case the %Config values aren't -set. LD is now set in init_linker(). +Also provide defaults for LD and AR in case the %Config values aren't +set. LDLOADLIBS's default is changed to $Config{libs}. @@ -181,7 +181,7 @@ sub init_others { $self->{TEST_F} ||= '$(PERLRUN) -MExtUtils::Command -e test_f'; $self->{DEV_NULL} ||= '> NUL'; - + $self->{LD} ||= $Config{ld} || 'link'; $self->{AR} ||= $Config{ar} || 'lib'; $self->SUPER::init_others; @@ -382,15 +382,11 @@ END =item init_linker -Unless previosuly set initializes LD to be the linker specified in Config and falls back -to the standard Win32 linker 'link'. - =cut sub init_linker { my $self = shift; - $self->{LD} ||= $Config{ld} || 'link'; $self->{PERL_ARCHIVE} = "\$(PERL_INC)\\$Config{libperl}"; $self->{PERL_ARCHIVE_AFTER} = ''; $self->{EXPORT_LIST} = '$(BASEEXT).def'; diff --git a/lib/ExtUtils/t/MM_Unix.t b/lib/ExtUtils/t/MM_Unix.t index 571d2c5..6683761 100644 --- a/lib/ExtUtils/t/MM_Unix.t +++ b/lib/ExtUtils/t/MM_Unix.t @@ -18,7 +18,7 @@ BEGIN { plan skip_all => 'Non-Unix platform'; } else { - plan tests => 117; + plan tests => 115; } } @@ -235,16 +235,10 @@ is ($t->replace_manpage_separator('Foo/Bar'),'Foo::Bar','manpage_separator'); ############################################################################### $t->init_linker; -foreach (qw/ EXPORT_LIST PERL_ARCHIVE PERL_ARCHIVE_AFTER LD /) +foreach (qw/ EXPORT_LIST PERL_ARCHIVE PERL_ARCHIVE_AFTER /) { - use Config; ok( exists $t->{$_}, "$_ was defined" ); - if ($_ eq 'LD' && defined $Config{ld}) { - like($t->{LD}, qr/^($Config{ld}|ld)$/, - "LD ($t->{LD}) is like in %Config ($t->{$_}) or 'ld'"); - } else { - is($t->{$_}, '', "$_ is empty on Unix"); - } + is( $t->{$_}, '', "$_ is empty on Unix"); } diff --git a/lib/ExtUtils/t/MM_Win32.t b/lib/ExtUtils/t/MM_Win32.t index 6e39f7a..1431aba 100644 --- a/lib/ExtUtils/t/MM_Win32.t +++ b/lib/ExtUtils/t/MM_Win32.t @@ -110,12 +110,12 @@ delete $ENV{PATHEXT} unless $had_pathext; } # init_others(): check if all keys are created and set? -# qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP TEST_F AR LDLOADLIBS DEV_NUL ) +# qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP TEST_F LD AR LDLOADLIBS DEV_NUL ) { my $mm_w32 = bless( { BASEEXT => 'Foo' }, 'MM' ); $mm_w32->init_others(); my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP - TEST_F AR LDLOADLIBS DEV_NULL ); + TEST_F LD AR LDLOADLIBS DEV_NULL ); for my $key ( @keys ) { ok( $mm_w32->{ $key }, "init_others: $key" ); } @@ -192,7 +192,6 @@ delete $ENV{PATH} unless $had_path; my $after = ''; $MM->init_linker; - ok( $MM->{ LD }, "init_linker sets LD" ); is( $MM->{PERL_ARCHIVE}, $libperl, 'PERL_ARCHIVE' ); is( $MM->{PERL_ARCHIVE_AFTER}, $after, 'PERL_ARCHIVE_AFTER' ); is( $MM->{EXPORT_LIST}, $export, 'EXPORT_LIST' );