Re: Scons and optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sindre Pedersen Bjordal wrote:
> Should this go to fedora-packaging? If so, I'm sorry.
> 
> Trying to build yafray, which is a raytracing-based rendering system
> that can be used with Blender. It uses scons as it's build system. Due
> to the nature of this software, it does a lot of calculations, upstream
> suggest optimization, see:
> http://wiki.yafray.org/bin/view.pl/UserDoc/FaqEng#Compilation 
> 
> There's no scons guidelines in the wiki, although DraftsTodo does state:
> "In the announcement thread for the cmake guidelines, it was suggested
> that scons guidelines in the same vein would be useful."
> 
> Two questions: How do I deal with scons on a general basis? and How do I
> deal with scones and optimization in this particular case?

I just had a quick look at the get_cxxflags() function at:
https://svn.blender.org/svnroot/yafray/trunk/yafray/linux-settings.py

You can specify any gcc supported ${arch} as indicated by the wiki,
and scons will then use the following:

-O3 -ffast-math -fomit-frame-pointer -march=${arch}

Determining the correct arch and other optimization options
is confusing though. One to try first is the new "native" arch,
which automatically selects the appropriate optimizations,
for the system the compile is being executed on.

For older/explicit optimizations have a look at my gcccpuopt script:
http://www.pixelbeat.org/scripts/gcccpuopt

Running this on my local machine gives "-march=pentium4 -mfpmath=sse -msse3"
So one can strip the -march= bit and pass that through scons using the command:

scons arch="pentium4 -mfpmath=sse -msse3"

cheers,
Pádraig.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux