From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34435 invoked by alias); 5 Mar 2015 20:23:09 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 34422 invoked by uid 89); 5 Mar 2015 20:23:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <54F8BB28.90804@redhat.com> Date: Thu, 05 Mar 2015 20:23:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Roland McGrath , "GNU C. Library" Subject: Re: [COMMITTED PATCH] Avoid C++ tests when the C++ cannot be linked. References: <20150304215551.7E6E22C3B7B@topped-with-meat.com> In-Reply-To: <20150304215551.7E6E22C3B7B@topped-with-meat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00207.txt.bz2 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 > > * 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.