[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFE: macro for warning at configure-time if CFLAGS includes -Werror
From: |
Eric Blake |
Subject: |
Re: RFE: macro for warning at configure-time if CFLAGS includes -Werror |
Date: |
Wed, 19 Sep 2012 16:38:25 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 |
On 09/19/2012 04:30 PM, Marko Lindqvist wrote:
> On 20 September 2012 01:12, Marko Lindqvist <address@hidden> wrote:
>> FWIW my opinion as maintainer of several autoconf-using packages is
>> that it really should be my decision if -Werror given by user is
>> passed to configure tests. However, default could be either way - l
>> just need power to override that. I have at least one test that should
>> fail if -Werror is going to be used in real software compilation and
>> the tested thing is giving warnings.
>
> Actually, *other* tests in the same configure script will give wrong
> results if "-Werror" passed, so ideally it should be easy to give
> "-Werror" for that single test only.
I think you meant some tests will give wrong results if user-requested
-Werror is filtered.
> So maybe filtering by default but
> storing information whether "-Werror" was part of original CFLAGS
> (CXXFLAGS, CPPFLAGS?) to documented variable or other part of official
> API for configure.ac author to reinstate "-Werror" at will.
Indeed, we may end up documenting:
AC_PROG_CC_FILTER_WERROR
AC_PROG_CC
to enable filtering mode (or perhaps a new optional second argument to
AC_PROG_CC([search list], [filter-werror]) that sets options as part of
AC_PROG_CC), and then the ability to undo that filtering on a per-test
basis, by adding a new optional fourth argument to
AC_COMPILE_IFELSE([code], [if-true], [if-false], [undo-filter]) and friends.
>
> This leaves me just wrapping my head around what will happen to other
> variables with values based on contents of CFLAGS while it was
> filtered, and does it even matter.
That's why I'm thinking that filtering -Werror has to be a conscious
decision in configure.ac, and not the default enforced by stock autoconf.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: RFE: macro for warning at configure-time if CFLAGS includes -Werror, (continued)
Re: RFE: macro for warning at configure-time if CFLAGS includes -Werror, Bob Friesenhahn, 2012/09/19
Re: RFE: macro for warning at configure-time if CFLAGS includes -Werror, Marko Lindqvist, 2012/09/19