gcc/target.cmake: fixup for #58408 (fix build with GCC 13)

58408 fixed compilation for GCC >= 13.1. But -dumpversion's output
length depends on compile time configuration. It might only yield the
major version. So use -dumpfullversion instead, which is guaranteed to
always include major, minor and patch version.

Signed-off-by: Jan Henke <Jan.Henke@taujhe.de>
This commit is contained in:
Jan Henke 2023-07-27 20:41:20 +02:00 committed by Carles Cufí
commit 586fc90760

View file

@ -38,7 +38,7 @@ endif()
# https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=be9dd80f933480
# Add check for GCC version >= 13.1
execute_process(
COMMAND ${CMAKE_C_COMPILER} -dumpversion
COMMAND ${CMAKE_C_COMPILER} -dumpfullversion
OUTPUT_VARIABLE temp_compiler_version
)