Get full version of gcc

Recent gcc versions return a short version with -dumpversion, e.g. 9.

In this case, use -dumpfullversion, which gives something like 9.1.0.

This makes the gcc 9 detection work properly.
This commit is contained in:
Jean-Marc Lasgouttes 2019-06-12 20:17:55 +02:00
parent 79d84fad0e
commit 44bbd0b0ef

View File

@ -381,6 +381,10 @@ if test x$GXX = xyes; then
if test x$CLANG = xno; then
dnl Useful for global version info
gxx_version=`${CXX} -dumpversion`
case $gxx_version in
*.*) ;;
*) gxx_version=`${CXX} -dumpfullversion` ;;
esac
CXX_VERSION="($gxx_version)"
else
gxx_version=clang-$clang_version