Bug#660195: perl: Makefile.PL arguments not passed to recursive invocations

Niko Tyni ntyni at debian.org
Sat Feb 25 20:06:29 UTC 2012


tag 660195 patch
thanks

On Sat, Feb 25, 2012 at 03:39:43PM +0200, Niko Tyni wrote:
> On Fri, Feb 17, 2012 at 12:19:28PM +0200, Niko Tyni wrote:
> > Package: perl
> > Version: 5.14.2-7
> > Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=28632
> > 
> > As noted in #657853, Makefile.PL command line arguments like OPTIMIZE and
> > LD aren't passed down to recursive invocations when there are Makefile.PL
> > files in subdirectories. This is hindering the adoption of hardening
> > build flags.
> > 
> > The libimager-perl package is an example.

> Patching the code so that all the command line arguments go through
> seems rather invasive IMO, at least without a better understanding
> of the issue. Just adding LD and OPTIMIZE would cover our use case.
> Perhaps we should try that and run a test rebuild of affected packages.

The attached patch whitelists LD and OPTIMIZE. I've built a test
perl package with this, and it seems to get libimager-perl built
with the security flags after

-       dh_auto_configure -- --disable=TT-fonts
+       dh_auto_configure -- --disable=TT-fonts OPTIMIZE="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" LD="$(shell perl -V::ld:) $(shell dpkg-buildflags --get LDFLAGS)"

The next step could be finding out which XS module packages have
more than one Makefile.PL inside and testing those.
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-EU-MM-use-LD-and-OPTIMIZE-in-recursive-Makefile.patch
Type: text/x-diff
Size: 1570 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20120225/deea6b23/attachment.patch>


More information about the Perl-maintainers mailing list