Make ExtUtils::CBuilder reset ccflags on compile for VMS.
authorCraig A. Berry <craigberry@mac.com>
Thu, 31 Mar 2011 22:09:31 +0000 (17:09 -0500)
committerCraig A. Berry <craigberry@mac.com>
Mon, 4 Apr 2011 09:15:51 +0000 (04:15 -0500)
commita24b897525551a1d93b043c9f896a41b26dd3a15
treeff7b13e411f28c5cbe8c4a68765e80224a924b03
parent57f45d7ba6658ede12e3850ae36f93319790c957
Make ExtUtils::CBuilder reset ccflags on compile for VMS.

On VMS only, the /DEFINE and /INCLUDE qualifiers are parsed off the
local copy of $Config{ccflags} and consumed in the process.  This is
necessary because you're only allowed one of each of these clauses
in the compile command, so to add whatever has been requested for a
specific compile, we have to combine them with whatever Perl was
built with.

But since they are consumed, multiple compiles on the same EU::CB
object were only using the correct flags for the first one.  Even
calling the have_compiler() check before compile() would make the
latter miss the defines and includes that were used to build Perl.

The solution is add a platform override that resets the local copy
of $Config{ccflags} from its original in %Config every time a
compiler operation is initiated.

Fixes smoke failures in ExtUtils::ParseXS.
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm