]> git.proxmox.com Git - mirror_qemu.git/commitdiff
configure: Handle having no c++ compiler in FORTIFY_SOURCE check
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 26 Jun 2017 15:25:24 +0000 (16:25 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 11 Jul 2017 08:18:37 +0000 (11:18 +0300)
Our FORTIFY_SOURCE check assumes that $cxx refers to a working C++
compiler, with the result that if you don't happen to have one
then configure will spuriously print
  configure: line 4685: c++: command not found

Fix this by adding a 'has $cxx' check.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
configure

index ce7e8aa84267dd9f20417235ffcaab0a79ce3c35..08ef54103e5fe0ec3b7b1ae1ae2ec5502ce265a3 100755 (executable)
--- a/configure
+++ b/configure
@@ -4771,7 +4771,7 @@ fi
 if test "$fortify_source" != "no"; then
   if echo | $cc -dM -E - | grep __clang__ > /dev/null 2>&1 ; then
     fortify_source="no";
-  elif test -n "$cxx" &&
+  elif test -n "$cxx" && has $cxx &&
        echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then
     fortify_source="no";
   else