The build process of povray seams to set CFLAGS on its own. It tries to guess them by /proc/cpuinfo,... But it doesn't seem to work properly on my core 2 duo, because povray will use -march=k8 and -mtune=k8. I did not test other architectures, but it might also guess it incorrectly for other architectures. Reproducible: Always Steps to Reproduce: 1. Set your CFLAGS 2. emerge -1 povray 3. have a look at the used CFLAGS, -march=k8 doesn't make that much sense for core 2 duo Actual Results: The binary is _much_ slower compared to -march=nocona, tested with "povray benchmark.ini", difference of >30% speedup with nocona Expected Results: The ebuild should use "--disable-optimiz" configure option so custom CFLAGS are possible, at least for architectures where povray doesn't determine it correctly. "disable-optimiz" makes povray _only_ use your own CFLAGS. udiff to fix it: --- povray-3.6.1-r2.ebuild 2007-08-24 11:41:13.533016965 +0200 +++ povray-3.6.1-r2.ebuild.orig 2007-08-24 11:41:08.176613873 +0200 @@ -38,9 +38,6 @@ filter-flags -fomit-frame-pointer fi - # use our own CFLAGs instead of the autogenerated ones by povray - myconf="${myconf} --disable-optimiz" - use X && myconf="${myconf} --with-x" \ || myconf="${myconf} --without-x"\ CFLAGS="${CFLAGS} -DX_DISPLAY_MISSING"
The patch is reversed...
:*) Now the correct order ;) --- povray-3.6.1-r2.ebuild.orig 2007-08-24 11:41:08.176613873 +0200 +++ povray-3.6.1-r2.ebuild 2007-08-24 11:41:13.533016965 +0200 @@ -38,6 +38,9 @@ filter-flags -fomit-frame-pointer fi + # use our own CFLAGs instead of the autogenerated ones by povray + myconf="${myconf} --disable-optimiz" + use X && myconf="${myconf} --with-x" \ || myconf="${myconf} --without-x"\ CFLAGS="${CFLAGS} -DX_DISPLAY_MISSING"
fixed.