# New Ticket Created by Bruce Gray # Please include the string: [perl #19470] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=19470 >
In hints/mswin32.pl, there is code in place to customize the build environment based on the value of $cc. However, $cc is only populated by the 'cc' from the local 'perl -V'; the command-line flag '-cc=FOO' is not used here. This patch corrects that problem, as well as missing 'link', 'ar', and 'slash' values for MinGW. Tested under MinGW 2.0.0-3 (current) using these commands: perl Configure.pl --debugging --cc=gcc mingw32-make mingw32-make test Many warnings remain, but only one test fails (sprintf). With this patch, Parrot now supports MinGW out-of-the-box! -- Hope this helps, Bruce Gray -- attachment 1 ------------------------------------------------------ url: http://rt.perl.org/rt2/attach/46301/36291/613a29/mswin32_pl_MinGW.patch
Index: config/init/hints.pl =================================================================== RCS file: /cvs/public/parrot/config/init/hints.pl,v retrieving revision 1.3 diff -u -r1.3 hints.pl --- config/init/hints.pl 9 Dec 2002 04:02:09 -0000 1.3 +++ config/init/hints.pl 27 Dec 2002 01:39:50 -0000 @@ -6,7 +6,7 @@ $description="Loading platform and local hints files..."; -@args=(); +@args = qw( cc ); sub runstep { my $hints = "config/init/hints/" . lc($^O) . ".pl"; Index: config/init/hints/mswin32.pl =================================================================== RCS file: /cvs/public/parrot/config/init/hints/mswin32.pl,v retrieving revision 1.6 diff -u -r1.6 mswin32.pl --- config/init/hints/mswin32.pl 11 Oct 2002 01:46:52 -0000 1.6 +++ config/init/hints/mswin32.pl 27 Dec 2002 01:39:50 -0000 @@ -1,9 +1,18 @@ { + my %args; + @args{@args}=@_; + my($cc, $ccflags, $libs)=Configure::Data->get(qw(cc ccflags libs)); + + # Later in the Parrot::Configure::RunSteps->runsteps process, + # inter/progs.pl will merge the command-line overrides with the defaults. + # We do one bit of its work early here, because we need the result now. + $cc = $args{cc} if defined $args{cc}; + my $is_msvc = grep { $cc eq $_ } ( qw(cl cl.exe) ); my $is_mingw = grep { $cc eq $_ } ( qw(gcc gcc.exe) ); my $is_bcc = grep { $cc eq $_ } ( qw(bcc32 bcc32.exe) ); - + Configure::Data->set( rm_f => '$(PERL) -MExtUtils::Command -e rm_f', rm_rf => '$(PERL) -MExtUtils::Command -e rm_rf', @@ -66,8 +75,10 @@ elsif( $is_mingw ) { $libs='' if $libs =~ /\.lib\s/i; Configure::Data->set( - ld => 'gcc', - libs => $libs + link => 'gcc', + libs => $libs, + slash => '\\', + ar => 'ar', ); } }