X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=extras%2Fbindings%2Fswig%2Fpython%2FMakefile.am;h=5d9bcc127ebded1dee0ee7a92069dfda03242fa3;hb=8903c4c7a8537ef8218aa22671a9df074a662dc7;hp=25f0a4395d18089838e634e2d35c0771fae66ae9;hpb=343af227102f6b274bfd7f6c7220eb3b776ba5e3;p=lttng-tools.git diff --git a/extras/bindings/swig/python/Makefile.am b/extras/bindings/swig/python/Makefile.am index 25f0a4395..5d9bcc127 100644 --- a/extras/bindings/swig/python/Makefile.am +++ b/extras/bindings/swig/python/Makefile.am @@ -1,6 +1,25 @@ +# SPDX-License-Identifier: GPL-2.0-only + lttng.i: lttng.i.in $(SED) "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" < $(srcdir)/lttng.i.in >lttng.i +# Some versions of SWIG (like 3.0.12) generate code where a parameter called +# `swig_this` shadows a global of the same name. Later versions (like 4.0.1) +# have renamed this global to `Swig_This_global`. +# +# Disable some warning flags for that file. +AM_CFLAGS += \ + -Wno-cast-function-type \ + -Wno-missing-field-initializers \ + -Wno-null-dereference \ + -Wno-redundant-decls \ + -Wno-shadow \ + -Wno-unused-parameter + +# Swig regularily changes and generates code that results warnings which break +# Werror builds. Disable that option for this sub-project. +AM_CFLAGS += -Wno-error + AM_CPPFLAGS += $(PYTHON_INCLUDE) EXTRA_DIST = lttng.i.in @@ -12,8 +31,8 @@ MAINTAINERCLEANFILES = lttng_wrap.c lttng.py nodist__lttng_la_SOURCES = lttng_wrap.c _lttng_la_LDFLAGS = -module _lttng_la_LIBADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ - $(top_builddir)/src/common/libcommon.la + $(top_builddir)/src/common/libsessiond-comm.la \ + $(top_builddir)/src/common/libcommon-gpl.la lttng_wrap.c: lttng.i $(SWIG) -python -I. -I$(top_srcdir)/src/common/sessiond-comm lttng.i