From 016941a164cf20c4ae6b90c3ea6f9b7efc562a49 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 13 Feb 2020 10:35:34 -0500 Subject: [PATCH] Ignore -Wincomplete-setjmp-declaration warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We currently get this when building a test that requires UST: make[4]: Entering directory '/home/smarchi/build/lttng-tools-clang/tests/regression/ust/linking' CC tp.lo In file included from /home/smarchi/src/lttng-tools/tests/regression/ust/linking/tp.c:11: In file included from /home/smarchi/src/lttng-tools/tests/regression/ust/linking/./ust_tests_demo.h:38: In file included from /home/smarchi/install/include/lttng/tracepoint-event.h:58: In file included from /home/smarchi/install/include/lttng/ust-tracepoint-event.h:28: In file included from /home/smarchi/install/include/lttng/ust-events.h:41: /usr/include/pthread.h:744:12: error: declaration of built-in function '__sigsetjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header . [-Werror,-Wincomplete-setjmp-declaration] extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL; ^ I'm not sure what we can do about it, and I believe the warning is bogus. I do have a definition for the "jmp_buf" type in /usr/include/setjmp.h: typedef struct __jmp_buf_tag jmp_buf[1]; And even with I include , the warning does not go away. I'm not sure if that's right, but this patch disables the warning. Change-Id: Ibe7451dc0afc9aaca59431296d42011d9e4306f9 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 7b2845934..e3b23f465 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,12 @@ AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"]) # -Wunknown-warning-option diagnostic fatal with clang. AX_APPEND_COMPILE_FLAGS([ dnl -Wall dnl + dnl We currently get this warning when building with Clang: + dnl + dnl /usr/include/setjmp.h:54:12: error: declaration of built-in function '__sigsetjmp' requires the declaration of the 'jmp_buf' type, commonly provided in the header . [-Werror,-Wincomplete-setjmp-declaration] + dnl extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL; + dnl ^ + -Wno-incomplete-setjmp-declaration dnl ], [WARN_CFLAGS], [-Werror]) -- 2.34.1