X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utils%2Fperlcc.PL;h=361069edf25e4513ae1c54f2d300052634e6c2b8;hb=8bbf3450a1ff0a3996dade29a4194cc0939d871f;hp=51f52eda5a75d37d63833579d3607be1970e75d7;hpb=b326da91b4676e27e5730b09997d383adc2468b4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utils/perlcc.PL b/utils/perlcc.PL index 51f52ed..361069e 100644 --- a/utils/perlcc.PL +++ b/utils/perlcc.PL @@ -42,6 +42,7 @@ print OUT <<'!NO!SUBS!'; # Version 2.01, Tom Christiansen, Thu Mar 30 08:25:14 MST 2000 # Version 2.02, Simon Cozens, Sun Apr 16 01:53:36 JST 2000 # Version 2.03, Edward Peschko, Mon Feb 26 12:04:17 PST 2001 +# Version 2.04, Enache Adrian,Fri, 18 Jul 2003 23:15:37 +0300 use strict; use warnings; @@ -52,7 +53,7 @@ use Config; use Fcntl qw(:DEFAULT :flock); use File::Temp qw(tempfile); use Cwd; -our $VERSION = 2.03; +our $VERSION = 2.04; $| = 1; $SIG{INT} = sub { exit(); }; # exit gracefully and clean up after ourselves. @@ -178,6 +179,7 @@ sub parse_argv { 'static', # Dirty hack to enable -shared/-static 'shared', # Create a shared library (--shared for compat.) 'log:s', # where to log compilation process information + 'Wb:s', # pass (comma-sepearated) options to backend 'testsuite', # try to be nice to testsuite ); @@ -224,53 +226,18 @@ sub compile_module { } sub compile_byte { - require ByteLoader; - my $stash = grab_stash(); - my $command = "$BinPerl -MO=Bytecode,$stash $Input"; - # The -a option means we'd have to close the file and lose the - # lock, which would create the tiniest of races. Instead, append - # the output ourselves. - vprint 1, "Writing on $Output"; - - my $openflags = O_WRONLY | O_CREAT; - $openflags |= O_BINARY if eval { O_BINARY; 1 }; - $openflags |= O_EXLOCK if eval { O_EXLOCK; 1 }; - - # these dies are not "$0: .... \n" because they "can't happen" - - sysopen(OUT, $Output, $openflags) - or die "can't write to $Output: $!"; - - # this is blocking; hold on; why are we doing this?? - # flock OUT, LOCK_EX or die "can't lock $Output: $!" - # unless eval { O_EXLOCK; 1 }; - - truncate(OUT, 0) - or die "couldn't trunc $Output: $!"; - - print OUT <