This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [COMMITTED PATCH] Avoid C++ tests when the C++ cannot be linked.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]