From f0f48232f045fe96ac5727c80a63e7e3d668814d Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 12 Jun 2019 20:17:55 +0200 Subject: [PATCH] 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 44bbd0b0ef8450f4d88dfb8c3345118f2fd14dfc) --- config/lyxinclude.m4 | 4 ++++ status.23x | 2 ++ 2 files changed, 6 insertions(+) diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 1bf9def1c3..164b2f7a89 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -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 diff --git a/status.23x b/status.23x index 23bd3edb11..a9f823323f 100644 --- a/status.23x +++ b/status.23x @@ -195,3 +195,5 @@ What's new * BUILD/INSTALLATION +- avoid annoying warnings with g++ 9. +