From: Florian Forster Date: Mon, 3 May 2010 07:22:39 +0000 (+0200) Subject: python plugin: Disable strict aliasing. X-Git-Tag: collectd-4.10.1~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2f2f3a6645d2b2a8a4486850f433d55821d525ba;p=collectd.git python plugin: Disable strict aliasing. "Py_True" and "Py_False" have some weird implementation that GCC can't cope with. Disable strict aliasing (and warnings relating to it) in order to avoid those problems at the cost of optimization. --- diff --git a/src/Makefile.am b/src/Makefile.am index 5290ab3b..2a32ece8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -853,6 +853,10 @@ if BUILD_PLUGIN_PYTHON pkglib_LTLIBRARIES += python.la python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS) +python_la_CFLAGS = $(AM_CFLAGS) +if COMPILER_IS_GCC +python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing +endif python_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_PYTHON_LDFLAGS) python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS) collectd_LDADD += "-dlopen" python.la