提交 65024c89 编写于 作者: A Andrea Bolognani

src: Fix checking for clang

The check was trying to use the shell variable $CC instead of
the make variable $(CC); it also interpreted grep's return code
wrong: 1 means the provided pattern was *not* matched. As a
result, pdwtags was never run, not even when building with gcc.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 5535856f
......@@ -668,8 +668,7 @@ struct_prefix = ($(libs_prefix)|$(other_prefix))
# which causes the comparison against expected output to fail, so skip
# if using clang as CC.
PDWTAGS = \
$(AM_V_GEN)$CC -v 2>&1 | grep -q clang; \
if test $$? == 1; then \
$(AM_V_GEN)if $(CC) -v 2>&1 | grep -q clang; then \
echo 'WARNING: skipping pdwtags test with Clang' >&2; \
exit 0; \
fi; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册