]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Build: Update the comment about -Werror usage in checks.
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 26 Sep 2023 14:24:15 +0000 (17:24 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 26 Sep 2023 14:24:15 +0000 (17:24 +0300)
configure.ac

index cf34c739b73f789c7c66b22c4f030c9c7791ad97..4d298430fc4f89d15a03329c2328cfd43a7612e5 100644 (file)
@@ -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"