On Mon, 17 Aug 2009 15:34:53 -0400, Joey Hess wrote:

Coming back to this, triggered by #596429:

> Now, back to the specific case of perl packages. In MakeMaker, OPTIMIZE
> apparently defaults to -O (according to its docs, but I have not found
> it in the code..). 

My impression is that the docs are wrong.
My observations see quite a few "-O2 -g"; and looking at the code my
guess is that EUMM (or even EUMM::Config) actually uses
perl's %Config.

$ perl -MConfig -e 'print $Config{optimize}'
-O2 -g

I'm sure Niko will correct my if I'm way off :)

> Will changing that default to
> dpkg-buildpackage's default of -O2 break anything? How can we tell? (How
> were the dpkg maintainer's able to tell when they started setting CFLAGS
> for everything?)

If my assumptions are correct then we are building EUMM-using
packages with "-O2 -g" since $whatever_time without any widespread
problems.

Therefore I guess having debhelper honour CFLAGS and friends via
passing them as OPTIMIZE would be useful.
 
> I haven't been able to figure out how build=optimize=-02 works in
> Module::Build, or what the default is.
 
Next guesses:
* Module::Build::API also mentions Config.pm
* $ perl -MModule::Build -e '$mb = new Module::Build(dist_name => Foo::Bar, 
dist_version => 1.2.3.4); print $mb->config("optimize")'
    ...
    -O2 -g

Cheers,
gregor
 
-- 
 .''`.   http://info.comodo.priv.at/ -- GPG key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: Tori Amos: Baker Baker

Attachment: signature.asc
Description: Digital signature

Reply via email to