From 98b21dcdb331798709edafcd65b5b7a1e07302db Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 20 Feb 2014 15:10:16 +0000 Subject: [PATCH] configure: check that C++ compiler actually works 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 Tested-by: Thomas Huth Tested-by: Alexey Kardashevskiy Message-id: 1392909016-14028-1-git-send-email-peter.maydell@linaro.org --- configure | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/configure b/configure index 39f2a1a..352a9c7 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 <