提交 e189091f 编写于 作者: P Peter Maydell 提交者: Michael Tokarev

configure: Handle having no c++ compiler in FORTIFY_SOURCE check

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: NPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 66767562
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册