Erik de Castro Lopo
2014-Dec-01 08:33 UTC
[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
Jan Stary wrote:> Yes, they are optimization switches. > But what are they doing in a NDEBUG setup? > It's none of NDEBUG's businnes to be adding these, right?NDEBUG means "no debug". Turning on optimisations when debug is disabled makes sense to me. What's the problem? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Jan Stary
2014-Dec-01 10:26 UTC
[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
On Dec 01 00:33:34, mle+la at mega-nerd.com wrote:> Jan Stary wrote: > > > Yes, they are optimization switches. > > But what are they doing in a NDEBUG setup? > > It's none of NDEBUG's businnes to be adding these, right? > > NDEBUG means "no debug". Turning on optimisations when debug is > disabled makes sense to me. What's the problem?Exactly. NDEBUG means "no debug". Nothing to do with "optimizations", let alone inventing -O flags the user didn't specify.
Brian Willoughby
2014-Dec-01 16:36 UTC
[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
On Dec 1, 2014, at 2:26 AM, Jan Stary <hans at stare.cz> wrote:> On Dec 01 00:33:34, mle+la at mega-nerd.com wrote: >> Jan Stary wrote: >> >>> Yes, they are optimization switches. >>> But what are they doing in a NDEBUG setup? >>> It's none of NDEBUG's businnes to be adding these, right? >> >> NDEBUG means "no debug". Turning on optimisations when debug is >> disabled makes sense to me. What's the problem? > > Exactly. NDEBUG means "no debug". Nothing to do with "optimizations", > let alone inventing -O flags the user didn't specify.Every project / makefile specifies optimization flags by default. There's no precedent for having a public project with absolutely no optimizations, leaving everything to the user to specify. It's quite standard to have Debug, Release, and then NDEBUG for Distribution. All build types specify an optimization level. Brian Willoughby Sound Consulting