Fix Clang version check

"clang -E -P /dev/stdin" causes warnings "clang: warning: /dev/stdin: 'linker'
input unused" etc.

Change-Id: Ia9c18b59b92558e1d959ce31caf38eed101865d3
This commit is contained in:
Stephan Bergmann
2015-11-19 08:59:08 +01:00
parent 2554efabb6
commit e6d21d08af

View File

@@ -3826,7 +3826,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
if test "$COM_IS_CLANG" = TRUE; then
AC_MSG_CHECKING([the Clang version])
clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC -E -P /dev/stdin`
CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P /dev/stdin`
CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P -`
CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)