scons: Use SCons' built in CXXVERSION instead of detecting our own.

It's not guaranteed that every compiler will set CXXVERSION, but both
gcc and clang do, and for any check of CXXVERSION to be meaningful, we
have to first check which compiler we're talking about.

Change-Id: Icd15e12832920fec6fa8634bc0fde16cc48e3f41
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41596
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Gabe Black
2021-02-07 23:58:57 -08:00
parent 978bd8759a
commit 41ccb6099b
2 changed files with 6 additions and 18 deletions

View File

@@ -28,7 +28,7 @@ Import('*')
from m5.util import compareVersions
if env['USE_SYSTEMC']:
if main['GCC'] and compareVersions(main['GCC_VERSION'], '10.0') >= 0:
if main['GCC'] and compareVersions(main['CXXVERSION'], '10.0') >= 0:
disable_false_positives = {
"CCFLAGS": [ "-Wno-array-bounds",
"-Wno-stringop-overflow" ]