packages: taglib/taglib.spec - add build type

Jakub Bogusz qboosh w pld-linux.org
Pią, 2 Paź 2009, 00:27:24 CEST


On Thu, Oct 01, 2009 at 05:34:05PM +0200, Bartosz Świątek wrote:
> W dniu 1 października 2009 16:43 użytkownik Jakub Bogusz
> <qboosh w pld-linux.org> napisał:
> > On Thu, Sep 24, 2009 at 09:50:22PM +0200, cactus wrote:
> >> Author: cactus                       Date: Thu Sep 24 19:50:22 2009 GMT
> >> Module: packages                      Tag: HEAD
> >> ---- Log message:
> >> - add build type
> >
> >>  %cmake \
> >>       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
> >>       -DLIB_INSTALL_DIR=%{_libdir} \
> >> +     -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
> >
> > CMAKE_BUILD_TYPE=Release causes cmake to override our optflags by
> > cmake-defined ones; particularly - by -O3, which causes code to be
> > bigger (because of more aggressive inlining), and thus - in larger
> > projects - possibly slower due to more code cache misses.
> 
> Where did you get this info? Does this apply also to all kde4-* packages?

Probably... cmake's "pretty output" hides gcc arguments
- CMAKE_VERBOSE_MAKEFILE should be used everywhere to get actually used
flags in build logs.

> The reason I put this into kde4-* packages was the overall "stability
> opinion" of kde4 developers. They say the code is more stable when
> using CMAKE_BUILD_TYPE=Release.

Perhaps in comparison with some "-fmany-many-options" pushed by some
gentoo users...
Anyway, "more stable" sounds a bit like "more pregnant" ;)

> Can you please add your sources so I can double check your statement? Thanks.

1) -O3 produces bigger code - simple consequence of more inlining and
loop unrolling, can be found in gcc docs

2) bigger code with the same cache size => conclusion is simple

Some googled documents:

http://freshmeat.net/articles/gcc-myths-and-facts
http://www.gentoo.org/doc/en/gcc-optimization.xml (even them)
...


-- 
Jakub Bogusz    http://qboosh.pl/


Więcej informacji o liście dyskusyjnej pld-devel-pl