Project

General

Profile

Bug #1297 » lttng-tools-remove_hardcoding_compiler_warning_flags.patch

Tomasz Kloczko, 02/24/2021 05:00 PM

View differences:

configure.ac~ 2021-02-23 03:14:29.000000000 +0000 → configure.ac 2021-02-24 01:06:07.269505219 +0000
RW_PROG_CXX_WORKS
AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
# Detect warning flags supported by the compiler, append them to WARN_CFLAGS.
#
# Pass -Werror as an extra flag during the test: this is needed to make the
# -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
-Wdiscarded-qualifiers dnl
-Wmissing-declarations dnl
-Wmissing-prototypes dnl
-Wmissing-parameter-type dnl
-Wold-style-definition dnl
-Wstrict-prototypes dnl
],
[WARN_CFLAGS],
[-Werror])
# When given, add -Werror to WARN_CFLAGS.
AC_ARG_ENABLE([Werror],
[AS_HELP_STRING([--enable-Werror], [Treat compiler warnings as errors.])]
(1-1/3)