From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGVGc-0002p4-PE for qemu-devel@nongnu.org; Thu, 20 Feb 2014 10:10:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGVGY-0005F2-R0 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 10:10:26 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGVGY-0005Ep-K9 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 10:10:22 -0500 From: Peter Maydell Date: Thu, 20 Feb 2014 15:10:16 +0000 Message-Id: <1392909016-14028-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] configure: check that C++ compiler actually works List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Thomas Huth , patches@linaro.org Check that the C++ compiler works with the C compiler; if it does not, then don't pass CXX to the build process. This fixes a regression where QEMU was no longer building if the build environment didn't have a C++ compiler (introduced in commit 3144f78b, which incorrectly assumed that rules.mak would only see a non-empty $(CXX) if configure had actually found a working C++ compiler). Signed-off-by: Peter Maydell Reported-by: Alexey Kardashevskiy Reported-by: Thomas Huth --- Apologies for the breakage for people who were building in setups with no C++ compiler -- I should have tested the original change more thoroughly. configure | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/configure b/configure index 4648117..6829cbb 100755 --- a/configure +++ b/configure @@ -1289,6 +1289,35 @@ else error_exit "\"$cc\" either does not exist or does not work" fi +# Check that the C++ compiler exists and works with the C compiler +if has $cxx; then + cat > $TMPC < $TMPC <