This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Less sed'ing in Cygwin Makefile.SHs
[perl5.git] / cygwin / perlld.in
index b33d0e2..85dc263 100644 (file)
@@ -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