autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bugs encountered updating GCC


From: Daniel Jacobowitz
Subject: Re: Bugs encountered updating GCC
Date: Thu, 11 Sep 2003 11:49:01 -0400
User-agent: Mutt/1.5.1i

On Sun, Sep 07, 2003 at 02:07:51PM -0400, Daniel Jacobowitz wrote:
> Hi autoconf'ers...
> 
> I've been involved in converting a number of projects in the GCC and sources
> (binutils, gdb, etc) repositories to autoconf 2.57.  By and large, it's
> going well, but we've turned up a couple of problems.  I'm not familiar with
> autoconf development, so these may have more historical baggage than I know
> about...
> 
> The first is with AC_CHECK_HEADERS.  The manual says:
>    Previous versions of Autoconf merely checked whether the header was
> accepted by the preprocessor.  This was changed because the old test was
> inappropriate for typical uses.  Headers are typically used to compile,
> not merely to preprocess, and the old behavior sometimes accepted
> headers that clashed at compile-time.
> 
> However, that's not the whole story.  The old check also failed if there
> were warning messages on stderr when preprocessing.  The new one doesn't do
> that, by default.  Instead it only does so if ac_c_preproc_warn_flag, which
> is only set if missing headers are a warning rather than an error. As a
> result autoconf now decides malloc.h is available on FreeBSD, even though it
> has a #warning in it.
> 
> Test case:
> foo.h:
> #warning "A.h"
> 
> configure.in:
> AC_INIT(foo.h)
> AC_CHECK_HEADERS([foo.h])
> AC_OUTPUT
> 
> Old output:
> configure:609: checking for foo.h
> configure:619: gcc -I/home/drow/autoconf/o/.. -E  conftest.c >/dev/null 
> 2>conftest.out
> In file included from configure:615:
> /home/drow/autoconf/foo.h:1:2: warning: #warning "A.h"
> configure: failed program was:
> #line 614 "configure"
> #include "confdefs.h"
> #include <foo.h>
> 
> 
> configure:2606: checking foo.h usability
> configure:2619: gcc -I/home/drow/autoconf/o/.. -c -g -O2  conftest.c >&5
> In file included from configure:2660: /home/drow/autoconf/foo.h:1:2: warning: 
> #warning "A.h"
> configure:2622: $? = 0
> configure:2625: test -s conftest.o
> configure:2628: $? = 0
> configure:2638: result: yes
> configure:2642: checking foo.h presence
> configure:2653: gcc -I/home/drow/autoconf/o/.. -E  conftest.c
> In file included from configure:2662: /home/drow/autoconf/foo.h:1:2: warning: 
> #warning "A.h"
> configure:2659: $? = 0
> configure:2678: result: yes
> configure:2714: checking for foo.h
> configure:2721: result: yes

Any comments on this?

I can work around it by conditionally putting -Werror into CPPFLAGS,
but I don't really like that; I'm not sure what else it might do to
configure.  Both compiler warnings and errors used to be fatal and now
neither of them seem to be.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]