<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [patch] Allow disabling C assertions with configure --disable-assert"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90796#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [patch] Allow disabling C assertions with configure --disable-assert"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90796">bug 90796</a>
              from <span class="vcard"><a class="email" href="mailto:williambader@hotmail.com" title="William Bader <williambader@hotmail.com>"> <span class="fn">William Bader</span></a>
</span></b>
        <pre>If ./configure sets CFLAGS, it becomes tricky to override options on the
command line.  I set CFLAGS only for "release" because it was necessary for
adding the -DNDEBUG.
The default CFLAGS is -O2 -g, and the other cases follow it with CXXFLAGS which
sets -g3, so touching the -g in CFLAGS has no effect.
Dealing with the -O2 would be messy. An option that set CFLAGS="$CFLAGS -O0"
would prevent you from being able to override CFLAGS with an optimization
option. Setting CFLAGS="-O0 $CFLAGS" would still use the -O2 that ./configure
puts into CFLAGS unless you overrode CFLAGS on the command line.
I think that there is not a good solution, and it is safer not to touch CFLAGS
unless it is necessary, but if you want me to set it, for example,
CFLAGS="$CFLAGS -O0 -g3", let me know what you want, I can make a new patch.

Do you have any opinion about using -Ofast instead of -O2 for releases?
-Ofast generates code that is usually faster than -O2 but about 15% larger.
<a href="http://www.phoronix.com/scan.php?page=article&item=gcc_47_optimizations&num=3">http://www.phoronix.com/scan.php?page=article&item=gcc_47_optimizations&num=3</a>

William</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>