aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-09-26 17:24:15 +0300
committerJia Tan <jiat0218@gmail.com>2023-10-31 18:44:59 +0800
commitdce95a593e6cd9779110aa1e314abd8b35c75f6b (patch)
tree3a8cf3198470b27c8ba9ef3e1e9abbf4f151f8a9
parentBuild: Fix underquoted AC_LANG_SOURCE. (diff)
downloadxz-dce95a593e6cd9779110aa1e314abd8b35c75f6b.tar.xz
Build: Update the comment about -Werror usage in checks.
Diffstat (limited to '')
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index b987e08d..63bc5d7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -832,8 +832,14 @@ AC_C_BIGENDIAN
# __attribute__((__constructor__)) can be used for one-time initializations.
# Use -Werror because some compilers accept unknown attributes and just
-# give a warning. If it works this should give no warnings, even
-# clang -Weverything should be fine.
+# give a warning.
+#
+# 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])
have_func_attribute_constructor=no
OLD_CFLAGS="$CFLAGS"