From 2f2f3a6645d2b2a8a4486850f433d55821d525ba Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 3 May 2010 09:22:39 +0200 Subject: [PATCH] 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. --- src/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.11.0