*CR:* libcairo should be built with -DNDEBUG
*Product:* JDS
*Release:* Nevada
*Changed Files:* cairo.spec
*Description of the Change:* Add -DNDEBUG option in release build to
remove assert() from binary.
It will improve the performance and avoid crashes on unessential errors.

*Code Changes:*
Index: cairo.spec
===================================================================
--- cairo.spec (revision 16871)
+++ cairo.spec (working copy)
@@ -87,7 +87,13 @@
autoheader
automake -a -c -f
autoconf
-export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS"
+
+%if %option_with_debug
+ export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS"
+%else
+ export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG"
+%endif
+
export LDFLAGS="%_ldflags"
./configure \
--prefix=%{_prefix} \


Reply via email to