Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 190027 - media-gfx/povray - CFLAGs for povray are set incorrectly when using Intel Core2Duo
Summary: media-gfx/povray - CFLAGs for povray are set incorrectly when using Intel Cor...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 11:32 UTC by Peter Barth
Modified: 2007-10-06 21:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Barth 2007-08-24 11:32:07 UTC
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"
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-24 11:35:52 UTC
The patch is reversed...
Comment 2 Peter Barth 2007-08-24 13:20:54 UTC
:*) 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"
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2007-10-06 21:08:49 UTC
fixed.