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
<setjmp.h>. [-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 <setjmp.h>, 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 <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
# -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 <setjmp.h>. [-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])