[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CHECK_FUNCS and gcc with -Werror
From: |
Steffen Dettmer |
Subject: |
Re: AC_CHECK_FUNCS and gcc with -Werror |
Date: |
Wed, 3 Mar 2010 15:27:17 +0100 |
On Wed, Mar 3, 2010 at 2:44 PM, Eric Blake <address@hidden> wrote:
> According to Steffen Dettmer on 3/3/2010 6:33 AM:
> > Do I understand correctly that it is generally adviced to not use
> > the option -Werror?
>
> Not quite. The advice is to not mix -Werror and configure.
ahh ok, this is fine!
There is no need to have -Werror during configure.
So it seems again we just do the things wrongly :)
But how to do it correctly?
> Post-configure, you can use -Werror to your heart's content, and I do it
> all the time in packages that I maintain.
I'm not sure if I get this...
How do I use -Werror or -WX post-configure correctly?
> And it is even possible to let configure check whether -Werror
> works, and if so, automatically add it to CFLAGS.
but CFLAGS are used by AC_CHECK_FUNCS?
(I think this is exactly my problem. my configure adds -Werror/-WX
automatically to CFLAGS).
> It's just that configure checks themselves are not guaranteed
> to be warning-free, so converting warnings to errors during
> configure is a recipe for disaster. In other words, the advice
> is that you shouldn't use './configure CFLAGS=-Werror'.
we use `./configure --enable-errors' (yes, the option name isn't
the best possible) which internally appends -Werror/-WX to
CFLAGS.
>> mmm... (I think the idea is to make a warning hurting to ensure
>> that it is fixed instantly and cannot be overseen / forgotten).
>
> The problem is that no one has submitted a patch to make configure and
> -Werror try to play nicely, until last month; and even then, it is not the
> easiest thing in the world to do.
I'm sorry, I didn't express well what we want. We do not
need/want -Werror inside configure. Just inside make.
I'm afraid again I just fail to see the obvious and it is very
easy to do?
>> Yes, inside configure -Werror isn't needed but for compiling
>> all the programs source files. How to add it for the program but
>> not for the configure run? Via libxyz_a_CFLAGS of all libs?
>
> That's one way. Or even via CFLAGS itself. It's just that you
> have to be careful that the CFLAGS are different during the
> configure run than during make in that case.
We now have in configure.in (or actually an included .m4 file)
`CFLAGS="$CFLAGS -Werror";' and `CFLAGS="$CFLAGS -WX"'. Is this
`via CFLAGS itself'? sorry for my silly questions but I just
don't get it...
oki,
Steffen
- Re: AC_CHECK_FUNCS and gcc with -Werror, (continued)
- Re: AC_CHECK_FUNCS and gcc with -Werror, Eric Blake, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Ralf Corsepius, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Peter Breitenlohner, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Russ Allbery, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Russ Allbery, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/04
- Re: AC_CHECK_FUNCS and gcc with -Werror, Russ Allbery, 2010/03/04
- Re: AC_CHECK_FUNCS and gcc with -Werror, NightStrike, 2010/03/05
- Re: AC_CHECK_FUNCS and gcc with -Werror,
Steffen Dettmer <=
- Re: AC_CHECK_FUNCS and gcc with -Werror, Ralf Corsepius, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Eric Blake, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Eric Blake, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Eric Blake, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/04
- Re: AC_CHECK_FUNCS and gcc with -Werror, Ralf Wildenhues, 2010/03/06
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/04
Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03