This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't require C++ bootstrap compiler (PR bootstrap/46810)
Jakub Jelinek <jakub@redhat.com> writes:
> On Mon, Dec 06, 2010 at 01:54:29PM -0800, Ian Lance Taylor wrote:
>> Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
>>
>> > * Ian Lance Taylor wrote on Mon, Dec 06, 2010 at 09:26:30PM CET:
>> > [ AC_CHECK_HEADERS C++ tests ]
>> >> Ralf, is there any way to tell autoconf to just skip the tests if there
>> >> is no C++ compiler? That is what I foolishly assumed is what would
>> >> happen here. The results of the tests simply don't matter if there is
>> >> no C++ compiler.
>> >
>> > I think Jakub's patch achieves just that, no?
>>
>> No, what Jakub's patch does is skip the tests if we don't need a C++
>> compiler. I am suggesting that configure simply fail the tests if it
>> doesn't find a C++ compiler, rather than erroring out as it does now.
>
> The tests themselves would just fail, sure, but the first use of a test in
> AC_LANG_PUSH(C++) (or the push itself) causes m4 to also add
> AC_LANG_PREPROC(C++) etc. code, and that has hard errors if the C++
> preprocessor (or compiler) is not found or not working.
Yes. What I'm asking is: is there a way to make that not happen. Is
there a way to just fail the tests when there is no C++ compiler, rather
than causing the configure script to error out.
Ian