From: Yves Orton Date: Wed, 4 Apr 2007 03:17:21 +0000 (+0200) Subject: ext\ExtUtils\t\Embed.t fails test when upgrading a perl with different core headers. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=92a665d639a42192198e801676cccae0bd9afa83;p=p5sagit%2Fp5-mst-13.2.git ext\ExtUtils\t\Embed.t fails test when upgrading a perl with different core headers. Message-ID: <9b18b3110704031817l37c034d3gf3d2b1cd205ac517@mail.gmail.com> p4raw-id: //depot/perl@30840 --- diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t index 629dafb..e3321ec 100644 --- a/lib/ExtUtils/t/Embed.t +++ b/lib/ExtUtils/t/Embed.t @@ -31,11 +31,14 @@ my $libperl_copied; my $testlib; my @cmd; my (@cmd2) if $^O eq 'VMS'; - +# Don't use ccopts() here as we may want to overwrite an existing +# perl with a new one with inconsistent header files, meaning +# the usual value for perl_inc(), which is used by ccopts(), +# will be wrong. if ($^O eq 'VMS') { push(@cmd,$cc,"/Obj=$obj"); my (@incs) = ($inc); - my $crazy = ccopts(); + my $crazy = ccflags(); if ($crazy =~ s#/inc[^=/]*=([\w\$\_\-\.\[\]\:]+)##i) { push(@incs,$1); } @@ -66,7 +69,8 @@ if ($^O eq 'VMS') { # instead of libperl.a. push @cmd, "-non_shared"; } - push(@cmd,"-I$inc",ccopts(),'embed_test.c'); + + push(@cmd,"-I$inc",ccflags(),'embed_test.c'); if ($^O eq 'MSWin32') { $inc = File::Spec->catdir($inc,'win32'); push(@cmd,"-I$inc"); @@ -149,8 +153,7 @@ unlink("embed_test.map","embed_test.lis") if $^O eq 'VMS'; unlink(glob("./*.dll")) if $^O eq 'cygwin'; unlink($testlib) if $libperl_copied; -# gcc -g -I.. -L../ -o perl_test perl_test.c -lperl `../perl -I../lib -MExtUtils::Embed -I../ -e ccopts -e ldopts` - +# gcc -g -I.. -L../ -o perl_test perl_test.c -lperl `../perl -I../lib -MExtUtils::Embed -I../ -e ccflags -e ldopts` __END__ /* perl_test.c */