[Poppler-bugs] [Bug 90796] [patch] Allow disabling C assertions with configure --disable-assert

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 14 21:40:48 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90796

--- Comment #10 from William Bader <williambader at hotmail.com> ---
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.
http://www.phoronix.com/scan.php?page=article&item=gcc_47_optimizations&num=3

William

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20150715/22c0c9d2/attachment.html>


More information about the Poppler-bugs mailing list