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.

(cherry picked from commit 44bbd0b0ef)
This commit is contained in:
Jean-Marc Lasgouttes 2019-06-12 20:17:55 +02:00
parent 691f29b4c7
commit f0f48232f0
2 changed files with 6 additions and 0 deletions

View File

@ -383,6 +383,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

View File

@ -195,3 +195,5 @@ What's new
* BUILD/INSTALLATION
- avoid annoying warnings with g++ 9.