This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [COMMITTED PATCH] Avoid C++ tests when the C++ cannot be linked.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Thu, 05 Mar 2015 15:23:04 -0500
- Subject: Re: [COMMITTED PATCH] Avoid C++ tests when the C++ cannot be linked.
- Authentication-results: sourceware.org; auth=none
- References: <20150304215551 dot 7E6E22C3B7B at topped-with-meat dot com>
On 03/04/2015 04:55 PM, Roland McGrath wrote:
> In a bootstrapping environment, libstdc++ is likely not to be available
> when building libc. This changes configure to check whether linking an
> empty C++ program with ${CXX} works (it won't when libstdc++ is missing),
> and elides all the C++ tests when that check fails.
>
> I've verified the check passes on a normal installation and fails in a
> partially-installed cross-compilation environment lacking libstdc++.
>
>
> Thanks,
> Roland
>
>
> 2015-03-04 Roland McGrath <roland@hack.frob.com>
>
> * configure.ac (libc_cv_cxx_link_ok): New check.
> Reset CXX to empty if it fails to link.
> * configure: Regenerated.
> * dlfcn/Makefile (tests, modules-names): Add bug-atexit3 and
> bug-atexit3-lib only if $(CXX) is nonempty.
> * nptl/Makefile (tests): Likewise for tst-cancel24.
> (tests, tests-static): Likewise for tst-cancel24-static.
> * debug/Makefile (tests): Likewise for tst-chk4, tst-chk5, tst-chk6,
> tst-lfschk4, tst-lfschk5, and tst-lfschk6.
>
I don't like this. The semantics I would rather have are that all such
tests fail, not fail to build, but fail. Then the results of `make check`
represent reality with all the C++ tests failing because you don't have
a libstdc++. This way it's clear that you haven't passed all of the testing
for glibc.
Cheers,
Carlos.