This patch will ensure the modules continues to suppress the
optimization, based on strict aliasing rules, after the option
is removed from $CWARNFLAGS. There is no change in the object
code produced.

There is no attempt to determine if the module should or should not
have such an optimization. A new warning (-Wstrict-aliasing=2)
has been added to the XORG_CWARNFLAGS macro to help  find code
that may interfere with optimization.
---
 src/Makefile.am |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 1098679..f8c3e6e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,10 @@
 lib_LTLIBRARIES=libSM.la
 
-AM_CFLAGS= $(CWARNFLAGS) -I${top_srcdir}/include $(SM_CFLAGS) $(XTRANS_CFLAGS)
+AM_CFLAGS = \
+       $(CWARNFLAGS) -fno-strict-aliasing \
+       -I${top_srcdir}/include \
+       $(SM_CFLAGS) \
+       $(XTRANS_CFLAGS)
 
 if WITH_LIBUUID
 AM_CFLAGS += $(LIBUUID_CFLAGS) -DHAVE_LIBUUID
-- 
1.6.0.4

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to