Skip to content

Commit

Permalink
configure: Handle having no c++ compiler in FORTIFY_SOURCE check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pm215 authored and Michael Tokarev committed Jul 11, 2017
1 parent 6676756 commit e189091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -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
Expand Down

0 comments on commit e189091

Please sign in to comment.