From 7df26522c31d9684d0784cbd55a8ef961148b07b Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Mon, 17 Apr 2023 14:48:29 +0000 Subject: [PATCH] Fix GCC compiler version command to outputting the full version number The version printed by GCC's -dumpversion option may only be a single number (the major version). Therefore use the -dumpfullversion option which guarantees to print the three numbers format 'major.minor.patchlevel'. Signed-off-by: Christoph Niethammer --- etc/platform-configs/hawk-tds/compiler/gnu | 2 +- etc/platform-configs/hawk/compiler/gcc | 2 +- etc/platform-configs/hawk/compiler/gnu | 2 +- etc/platform-configs/hazelhen/compiler/gnu | 2 +- etc/platform-configs/laki/compiler/gnu | 2 +- etc/platform-configs/vulcan/compiler/gnu | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/platform-configs/hawk-tds/compiler/gnu b/etc/platform-configs/hawk-tds/compiler/gnu index a2c385d..120cbfa 100644 --- a/etc/platform-configs/hawk-tds/compiler/gnu +++ b/etc/platform-configs/hawk-tds/compiler/gnu @@ -1,3 +1,3 @@ #!/bin/bash COMPILER_OPTS="CC=gcc CXX=g++ F77=gfortran FC=gfortran" -COMPILER_VERSION_CMD="gcc -dumpversion" +COMPILER_VERSION_CMD="gcc -dumpfullversion" diff --git a/etc/platform-configs/hawk/compiler/gcc b/etc/platform-configs/hawk/compiler/gcc index a2c385d..120cbfa 100644 --- a/etc/platform-configs/hawk/compiler/gcc +++ b/etc/platform-configs/hawk/compiler/gcc @@ -1,3 +1,3 @@ #!/bin/bash COMPILER_OPTS="CC=gcc CXX=g++ F77=gfortran FC=gfortran" -COMPILER_VERSION_CMD="gcc -dumpversion" +COMPILER_VERSION_CMD="gcc -dumpfullversion" diff --git a/etc/platform-configs/hawk/compiler/gnu b/etc/platform-configs/hawk/compiler/gnu index a2c385d..120cbfa 100644 --- a/etc/platform-configs/hawk/compiler/gnu +++ b/etc/platform-configs/hawk/compiler/gnu @@ -1,3 +1,3 @@ #!/bin/bash COMPILER_OPTS="CC=gcc CXX=g++ F77=gfortran FC=gfortran" -COMPILER_VERSION_CMD="gcc -dumpversion" +COMPILER_VERSION_CMD="gcc -dumpfullversion" diff --git a/etc/platform-configs/hazelhen/compiler/gnu b/etc/platform-configs/hazelhen/compiler/gnu index f65edef..f4bd48f 100644 --- a/etc/platform-configs/hazelhen/compiler/gnu +++ b/etc/platform-configs/hazelhen/compiler/gnu @@ -1,3 +1,3 @@ #!/bin/bash COMPILER_OPTS="CC=cc CXX=CC FC=ftn F90=ftn F77=ftn MPICC=cc MPICXX=CC MPIFC=ftn" -COMPILER_VERSION_CMD="cc -dumpversion" +COMPILER_VERSION_CMD="cc -dumpfullversion" diff --git a/etc/platform-configs/laki/compiler/gnu b/etc/platform-configs/laki/compiler/gnu index a2c385d..120cbfa 100644 --- a/etc/platform-configs/laki/compiler/gnu +++ b/etc/platform-configs/laki/compiler/gnu @@ -1,3 +1,3 @@ #!/bin/bash COMPILER_OPTS="CC=gcc CXX=g++ F77=gfortran FC=gfortran" -COMPILER_VERSION_CMD="gcc -dumpversion" +COMPILER_VERSION_CMD="gcc -dumpfullversion" diff --git a/etc/platform-configs/vulcan/compiler/gnu b/etc/platform-configs/vulcan/compiler/gnu index a2c385d..120cbfa 100644 --- a/etc/platform-configs/vulcan/compiler/gnu +++ b/etc/platform-configs/vulcan/compiler/gnu @@ -1,3 +1,3 @@ #!/bin/bash COMPILER_OPTS="CC=gcc CXX=g++ F77=gfortran FC=gfortran" -COMPILER_VERSION_CMD="gcc -dumpversion" +COMPILER_VERSION_CMD="gcc -dumpfullversion"