Skip to content

Commit

Permalink
bt2: compile native_bt.c with -Wno-undef
Browse files Browse the repository at this point in the history
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>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11930
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
  • Loading branch information
simark authored and jgalar committed Mar 28, 2024
1 parent f84425c commit d7e2a9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bindings/python/bt2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ WARN_CFLAGS += -Wno-deprecated-declarations
# Python 3.11 + gcc 12.2.0 gave warnings of this kind in Python.h.
WARN_CFLAGS += -Wno-redundant-decls

# 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" \
Expand Down

0 comments on commit d7e2a9a

Please sign in to comment.