Patchwork Don't require C++ bootstrap compiler (PR bootstrap/46810)

login
register
mail settings
Submitter Ian Taylor
Date Dec. 7, 2010, 9:05 p.m.
Message ID <mcr1v5tpa33.fsf@google.com>
Download mbox | patch
Permalink /patch/74597/
State New
Headers show

Comments

Ian Taylor - Dec. 7, 2010, 9:05 p.m.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:

> * Ian Lance Taylor wrote on Tue, Dec 07, 2010 at 08:22:27PM CET:
>> Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
>> 
>> >   m4_pushdef([AC_MSG_ERROR], [m4_defn([AC_MSG_WARN])])[]dnl
>
> This should've been
>       m4_pushdef([AC_MSG_ERROR], m4_defn([AC_MSG_WARN]))[]dnl
>
>> >   AC_PROG_CXXCPP
>> >   m4_popdef([AC_MSG_ERROR])[]dnl
>> >
>> > should achieve this effect.
>> 
>> Yikes.
>> 
>> Which approach would you prefer--this one, or the compilation test I
>> sent out earlier?
>
> The above has the advantage of not having to think about the exact
> command line and cleanup, so I slightly prefer it.
> 
> Either one are preapproved after suitable testing.

Tested with no g++ and no /lib/cpp.  Bootstrapped on
x86_64-unknown-linux-gnu.  Committed.

Thanks.

Ian


2010-12-07  Ian Lance Taylor  <iant@google.com>
	    Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	PR bootstrap/46810
	* configure.ac: Disable AC_MSG_ERROR while looking for the C++
	preprocessor.
	* configure: Rebuild.

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 167515)
+++ configure.ac	(working copy)
@@ -913,6 +913,12 @@  AC_C_BIGENDIAN
 # Checks for C++ headers
 # ----------------------
 
+dnl Autoconf will give an error in the configure script if there is no
+dnl C++ preprocessor.  Hack to prevent that.
+m4_pushdef([AC_MSG_ERROR], m4_defn([AC_MSG_WARN]))[]dnl
+AC_PROG_CXXCPP
+m4_popdef([AC_MSG_ERROR])[]dnl
+
 AC_LANG_PUSH(C++)
 
 AC_CHECK_HEADERS(unordered_map)