Build: Update the comment about -Werror usage in checks.

This commit is contained in:
Lasse Collin 2023-09-26 17:24:15 +03:00 committed by Jia Tan
parent f3c32762ae
commit dce95a593e
1 changed files with 8 additions and 2 deletions

View File

@ -832,8 +832,14 @@ AC_C_BIGENDIAN
# __attribute__((__constructor__)) can be used for one-time initializations. # __attribute__((__constructor__)) can be used for one-time initializations.
# Use -Werror because some compilers accept unknown attributes and just # Use -Werror because some compilers accept unknown attributes and just
# give a warning. If it works this should give no warnings, even # give a warning.
# clang -Weverything should be fine. #
# FIXME? Unfortunately -Werror can cause trouble if CFLAGS contains options
# that produce warnings for unrelated reasons. For example, GCC and Clang
# support -Wunused-macros which will warn about "#define _GNU_SOURCE 1"
# which will be among the #defines that Autoconf inserts to the beginning of
# the test program. There seems to be no nice way to prevent Autoconf from
# inserting the any defines to the test program.
AC_MSG_CHECKING([if __attribute__((__constructor__)) can be used]) AC_MSG_CHECKING([if __attribute__((__constructor__)) can be used])
have_func_attribute_constructor=no have_func_attribute_constructor=no
OLD_CFLAGS="$CFLAGS" OLD_CFLAGS="$CFLAGS"