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. > > The bug is probably somewhere around eval_in_x(), which has > { > package main; > do './Makefile.PL'; > };
Nope, that's not it. @ARGV is a global and is defined in the second invocation too. The behaviour seems to be intended: the logic is in the if (defined $Parent[-2]) block in ExtUtils::MakeMaker::new(), around MakeMaker.pm:540-580. Quoting: foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE)) { if (exists $self->{PARENT}->{$opt} and not exists $self->{$opt}) { # inherit, but only if already unspecified $self->{$opt} = $self->{PARENT}->{$opt}; } } Adding LD to the option list makes it go through to the sub-Makefiles. 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. Also, makema...@perl.org would presumably know best so they should probably be involved. -- Niko Tyni nt...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org