Bug#628522: perl: ExtUtils::MakeMaker overriding CCFLAGS when passed to WriteMakefile

Niko Tyni ntyni at debian.org
Mon May 30 20:05:43 UTC 2011


On Sun, May 29, 2011 at 07:46:06PM +0100, Dominic Hargreaves wrote:
> Package: perl-modules
> Version: 5.14.0-1
> Severity: important
> 
> This is a similar issue to that in
> <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624460>
> where Extutils::CBuilder was fixed to not overwrite
> $Config{ccflags} with $ENV{CFLAGS}.

> Again, this isn't a new problem, but it's only with 5.14 that it's fatal.

It's a bit hard to say whether this is a bug in EU::MM or the modules
overriding CCFLAGS. The documentation doesn't specify one way or the other,
but at least libdbd-oracle-perl seems to get it right with

  $opts{CCFLAGS} = "-P $Config{ccflags}" if $Config{cc} eq 'bcc32';  # force C++

Also, the last test in cpan/ExtUtils-MakeMaker/t/MM_Unix.t actually
checks that CCFLAGS overrides anything else, so this seems to be the
intended behaviour.

However, I can't think of a case where overriding $Config{ccflags} is
the correct thing to do.

The attached naive patch appends CCFLAGS to $Config{ccflags}. Could you
please try and see if it fixes things for you? Ideally, it would also
be useful to see if it breaks anything that used to work without it.
(The patch is with -p1 from the EU::MM repository so it won't apply to the
perl sources with just 'git am').

Once that's confirmed, I think the issue needs to be discussed upstream
before applying this for the Debian packages.
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Append-CCFLAGS-to-Config-ccflags-instead-of-overridi.patch
Type: text/x-diff
Size: 2169 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20110530/89d04416/attachment.patch>


More information about the Perl-maintainers mailing list