On 08/01/13 17:27, Marek Olšák wrote: > On Tue, Jan 8, 2013 at 6:11 PM, Matt Turner <matts...@gmail.com> wrote: >> On Tue, Jan 8, 2013 at 8:38 AM, Marek Olšák <mar...@gmail.com> wrote: >>> This reverts commit 122345876479cf5cf553e38162ab105658614ab7. >>> >>> Some distributions use --enable-debug for testing packages and the commit >>> results in terrible CPU performance. It can be embarrassing for us. >>> >>> Those who do not want optimizations should set the CFLAGS and CXXFLAGS >>> environment variables. In my opinion, --enable-debug should only set >>> -DDEBUG. >>> --- >> >> Dan's two patches from yesterday handle this while still setting -O0 >> if CFLAGS don't contain -O*. Do those patches work for your purposes? >> >> The problem here is that we're just going back and forth on this >> behavior and both behaviors are reasonable for different things. > > The problem is that we try to set -O0 for --enable-debug and I don't > like that and I'm not the only one. If you want -O0, you should add > another flag e.g. --disable-optimizations. The default behavior should > always be -O2, because I always want optimizations, but I also want to > sometimes turn on assertions and other run-time checks depending on > -DDEBUG. > I never thought that such a small change would cause such a lengthy discussion. Possibly I should have expected it considering that it causes quite noticeable change.
But to be honest, with all sanity I was not expecting distros to build packages with --enable-debug :P Considering all the arguments, as well as the annoying regression this has caused on Open64 builds please revert the commit. Dan's patches are quite nice, although the default optimization level (for gcc at least) is already -O0 > Also, people expect a certain behavior from --enable-debug and we > shouldn't change that. > > Adding --disable-optimizations is the way to go for those who need -O0. > This option sounds like a reasonable approach, that I will use if available (patch will is coming shortly) Emil > Marek > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev