[Top][All Lists]

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

Re: Bootstrapping glibc vs. dependency on system headers

From: Thomas Schwinge
Subject: Re: Bootstrapping glibc vs. dependency on system headers
Date: Fri, 18 Jan 2013 10:44:18 +0100
User-agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu)


On Thu, 17 Jan 2013 17:18:41 +0000, "Joseph S. Myers" <address@hidden> wrote:
> Really, for glibc bootstrapping I don't think you want to include any 
> headers there.  If $CPP is defined and nonempty, use that, otherwise use 
> $CC -E; no testing for a "working" preprocessor is needed; we require GCC 
> 4.3 or later for building glibc.

OK.  I'd still be interested in hearing from the Autoconf folks whether
something should be done on Autoconf side, too.  Also, regarding the
/lib/cpp fallback in the cross-compilation case.

> > Issue 3: Assuming fixing Autoconf is the way to go, what do we do in
> > glibc until we upgrade to the respective future version of Autoconf?
> > Supply our own copy of _AC_PROG_PREPROC_WORKS_IFELSE (or AC_PROG_CPP)?
> Yes.  There's already code in configure.in to do something special with 

Yep -- I had submitted an equivalent patch months before H.J.'s was then
applied.  ;-)

Here's now one for AC_PROG_CPP, borrowing from Autoconf's definition of
AC_PROG_CPP, leaving out the "details" we're not interested in (in
particular also the final »C preprocessor "$CPP" [...] sanity check«).
Tested on x86_64 GNU/Linux for a ARM GNU/Linux host.  OK to apply?

        * configure.in (AC_PROG_CPP): New definition.

diff --git configure.in configure.in
index 05cbad5..ee72c17 100644
--- configure.in
+++ configure.in
     [ac_includes_default='/* none */'])])
+# We require GCC, and by default use its preprocessor.  Override AC_PROG_CPP
+# here to work around the Autoconf issue discussed in
+# <http://news.gmane.org/address@hidden>.
+AC_ARG_VAR([CPP],      [C preprocessor])dnl
+AC_MSG_CHECKING([how to run the C preprocessor])
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+if test -z "$CPP"; then
+  AC_CACHE_VAL([ac_cv_prog_CPP],
+  [dnl
+    ac_cv_prog_CPP="$CC -E"
+  ])dnl
+  CPP=$ac_cv_prog_CPP
+  ac_cv_prog_CPP=$CPP
 dnl This is here so we can set $subdirs directly based on configure fragments.


Attachment: pgpfBCQVYV_me.pgp
Description: PGP signature

reply via email to

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