[COMMITTED PATCH] Avoid C++ tests when the C++ cannot be linked.
Carlos O'Donell
carlos@redhat.com
Thu Mar 5 20:23:00 GMT 2015
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.
More information about the Libc-alpha
mailing list