autoconf
[Top][All Lists]
Advanced

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

Re: Bugs encountered updating GCC


From: Paul Eggert
Subject: Re: Bugs encountered updating GCC
Date: 12 Sep 2003 10:32:06 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Daniel Jacobowitz <address@hidden> writes:

> GCC is built (in bootstrap mode at least, where we know the compiler
> will be GCC) using -Werror.

OK.  Then it should be configured with -Werror too.  In general, you
can't configure with one set of options, and build with a different
set of options, without running into problems like this.

In general, if you're going to use two different compilers in
different stages of thebuild, you to have to do the equivalent of
running 'configure' twice.  Once for the native compiler, and once for
the bootstrap mode where you know the compiler is GCC.  This is
because the two compilers won't necessarily be compatible.

If I recall correctly, GCC doesn't run 'configure' twice; instead, it
uses 'configure' to determine the characteristics of the native
compiler, and then overrides that determination when it knows that it
is compiling itself.  You can do this with something like the
following:

#include <config.h>

/* Do not include <memory.h> if compiling with GCC, even if 'configure'
   found it available with the native compiler.  GCC never needs
   <memory.h>, and since we use -Werror in bootstrap mode, including
   <memory.h> here might cause a compilation failure.  */
#ifdef __GNU_C__
# undef HAVE_MEMORY_H
#endif




reply via email to

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