diff options
Diffstat (limited to 'utils/perlcc.PL')
-rw-r--r-- | utils/perlcc.PL | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/utils/perlcc.PL b/utils/perlcc.PL index 7aca1d8726..afad20a2b4 100644 --- a/utils/perlcc.PL +++ b/utils/perlcc.PL @@ -308,16 +308,18 @@ sub _ccharness if (!grep(/^-[cS]$/, @args)) { - my $lperl = $^O eq 'os2' ? '-llibperl' : '-lperl'; + my $lperl = $^O eq 'os2' ? '-llibperl' + : $^O eq 'MSWin32' ? "$Config{archlibexp}\\CORE\\perl.lib" + : '-lperl'; my $flags = $type eq 'dynamic' ? $Config{lddlflags} : $Config{ldflags}; - $linkargs = "$flags $libdir $lperl @Config{libs}"; + $linkargs = "$flags $libdir $lperl $Config{libs}"; } my @sharedobjects = _getSharedObjects($sourceprog); my $dynaloader = "$Config{'installarchlib'}/auto/DynaLoader/DynaLoader.a"; my $optimize = $Config{'optimize'} =~ /-O\d/ ? '' : $Config{'optimize'}; my $cccmd = - "$Config{cc} @Config{qw(ccflags)} $optimize $incdir @sharedobjects @args $dynaloader $linkargs"; + "$Config{cc} $Config{ccflags} $optimize $incdir @sharedobjects @args $dynaloader $linkargs"; _print ("$cccmd\n", 36); @@ -331,16 +333,16 @@ sub _getSharedObjects my (@return); local($") = " -I"; - if ($Config{'osname'} eq 'MSWin32') { - # _addstuff; - } - else - { - my ($tmpprog); - ($tmpprog = $sourceprog) =~ s"(.*)[\/\\](.*)"$2"; - $tmpfile = "/tmp/$tmpprog.tst"; - $incfile = "/tmp/$tmpprog.val"; + my ($tmpprog); + ($tmpprog = $sourceprog) =~ s"(.*)[\/\\](.*)"$2"; + my $tempdir = '/tmp'; + if ($Config{'osname'} eq 'MSWin32') { + $tempdir = $ENV{TEMP}; + $tempdir =~ s[\\][/]g; + } + $tmpfile = "$tempdir/$tmpprog.tst"; + $incfile = "$tempdir/$tmpprog.val"; } my $fd = new FileHandle("> $tmpfile") || die "Couldn't open $tmpfile!\n"; |