[cairo-commit] pycairo ChangeLog,1.56,1.57 configure.ac,1.15,1.16

Steve Chaplin commit at pdx.freedesktop.org
Fri Mar 18 07:27:47 PST 2005


Committed by: stevech1097

Update of /cvs/cairo/pycairo
In directory gabe:/tmp/cvs-serv20493

Modified Files:
	ChangeLog configure.ac 
Log Message:
SC 2005/03/18

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/pycairo/ChangeLog,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- ChangeLog	18 Mar 2005 12:04:34 -0000	1.56
+++ ChangeLog	18 Mar 2005 15:27:45 -0000	1.57
@@ -1,5 +1,10 @@
 2005-03-18  Steve Chaplin  <steve1097 at yahoo.com.au>
 
+	* configure.ac (CFLAGS): use -fno-strict-aliasing with gcc, if
+	available
+
+2005-03-18  Steve Chaplin  <steve1097 at yahoo.com.au>
+
 	* cairo/cairomodule.c (pycairo_pdf_surface_create),
 	cairo/pycairo-context.c (pycairo_set_target_pdf): temporary disable -
 	prototype has changed.

Index: configure.ac
===================================================================
RCS file: /cvs/cairo/pycairo/configure.ac,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- configure.ac	10 Mar 2005 09:18:09 -0000	1.15
+++ configure.ac	18 Mar 2005 15:27:45 -0000	1.16
@@ -87,7 +87,7 @@
 AM_CONDITIONAL(HAVE_LIBSVG_CAIRO, $have_libsvg_cairo)
 
 
-# add debugging options ...
+# add gcc debugging options
 changequote(,)dnl
 if test "x$GCC" = xyes; then
   case " $CFLAGS " in
@@ -102,6 +102,26 @@
 fi
 changequote([,])dnl
 
+case $GCC in
+yes)
+  # code using Py_True, Py_False will receive 
+  # "warning: dereferencing type-punned pointer will break strict-aliasing rules"
+  # -fno-strict-aliasing (as used in Python build) switches warnings off
+    AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
+     ac_save_cc="$CC"
+     CC="$CC -fno-strict-aliasing"
+     AC_TRY_RUN([int main() { return 0; }],
+     ac_cv_no_strict_aliasing_ok=yes,
+     ac_cv_no_strict_aliasing_ok=no,
+     ac_cv_no_strict_aliasing_ok=no)
+     CC="$ac_save_cc"
+    AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
+    if test $ac_cv_no_strict_aliasing_ok = yes
+    then
+      CFLAGS="$CFLAGS -fno-strict-aliasing"
+    fi
+esac
+
 AC_CONFIG_FILES(
   Makefile
   cairo/__init__.py




More information about the cairo-commit mailing list