X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cygwin%2Fperlld.in;h=85dc2632d846ab78730255abd2b4e54c9d1ebfcd;hb=0a699383158a6d00fcd3c49d9e7b898c3d9e5704;hp=b33d0e2531be2ac0f6d7d249550b0a51e1587bca;hpb=ed423f7afb5038546a92d00ca689992f3e08bc61;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cygwin/perlld.in b/cygwin/perlld.in index b33d0e2..85dc263 100644 --- a/cygwin/perlld.in +++ b/cygwin/perlld.in @@ -46,11 +46,12 @@ if ($args !~ /\-o (\S+)/) { $path =~ s,[/\\](\.[/\\])*,/,g; } if ($dllname =~ /\./) { $libname =$`; } else { $libname =$dllname; }; - my $v_e_r_s = '5_9_0'; - if ( $dllname =~ /.*perl.*/) { + my $v_e_r_s = '@VERSION@'; + $v_e_r_s =~ tr/./_/; + if ( $dllname =~ /libperl.*/) { $dllname ="cygperl$v_e_r_s.dll"; } else { - $dllname ="$libname.dll"; + $dllname ="$libname.dll"; } $libname ="lib$libname" unless ($libname =~ /^lib/); print DEBUGFILE "dll name: $dllname\nimport library: $libname\npath: $path\n" if $DEBUG; @@ -63,6 +64,7 @@ if ($args !~ /\-o (\S+)/) { $command .=" -Wl,--out-implib=$libname.dll$LIB_EXT" if $LIB_EXT; $command .=" -Wl,--export-all-symbols" if $EXPORT_ALL; $command .=" -Wl,--enable-auto-import -Wl,--stack,8388608"; # always + $command .=" -Wl,--enable-auto-image-base"; # always # other args are passed through shellexec("$command \\\n$args\n"); @@ -76,8 +78,8 @@ if ($args !~ /\-o (\S+)/) { close DEBUGFILE if $DEBUG; #--------------------------------------------------------------------------- -sub shellexec{ - my $command =shift; +sub shellexec { + my $command = shift; print $command; print DEBUGFILE $command if $DEBUG; system($command) == 0