bt2: compile `native_bt.c` with `-Wno-undef`
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 22 Feb 2024 02:23:03 +0000 (21:23 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 28 Feb 2024 17:41:17 +0000 (12:41 -0500)
As explained in the comment, work around a problem with SWIG 4.2.0.

Change-Id: Ia95fc1e4929591a0a16df48892b05f5e5df46be3
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11849
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
src/bindings/python/bt2/Makefile.am

index 7d58b7324f13905ff37fa246dbb06abce0164092..77b3bec5d48af470a452216194ed07229db31b5d 100644 (file)
@@ -127,6 +127,14 @@ WARN_CFLAGS += -Wno-redundant-decls
 WARN_CFLAGS += -Wno-missing-field-initializers
 WARN_CFLAGS += -Wno-unused-parameter
 
+# SWIG 4.2.0 generates:
+#
+#   #if __cplusplus >=201103L
+#
+# ... leading to some `-Wundef` warnings when building the extension as C, where
+# `__cplusplus` is not defined.
+WARN_CFLAGS += -Wno-undef
+
 BUILD_FLAGS=CC="$(CC)" \
                CFLAGS="$(GLIB_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(WARN_CFLAGS)" \
                CPPFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS) -I$(srcdir)/bt2" \
This page took 0.026016 seconds and 4 git commands to generate.