scons: Setup scons for gem5 only supporting gcc >=10
Change-Id: I66f83498a38def3d00d1c9e981aa90706ee20bbb
This commit is contained in:
15
SConstruct
15
SConstruct
@@ -631,8 +631,8 @@ for variant_path in variant_paths:
|
|||||||
"src/SConscript to support that compiler.")))
|
"src/SConscript to support that compiler.")))
|
||||||
|
|
||||||
if env['GCC']:
|
if env['GCC']:
|
||||||
if compareVersions(env['CXXVERSION'], "7") < 0:
|
if compareVersions(env['CXXVERSION'], "10") < 0:
|
||||||
error('gcc version 7 or newer required.\n'
|
error('gcc version 10 or newer required.\n'
|
||||||
'Installed version:', env['CXXVERSION'])
|
'Installed version:', env['CXXVERSION'])
|
||||||
|
|
||||||
# Add the appropriate Link-Time Optimization (LTO) flags if
|
# Add the appropriate Link-Time Optimization (LTO) flags if
|
||||||
@@ -656,17 +656,6 @@ for variant_path in variant_paths:
|
|||||||
'-fno-builtin-malloc', '-fno-builtin-calloc',
|
'-fno-builtin-malloc', '-fno-builtin-calloc',
|
||||||
'-fno-builtin-realloc', '-fno-builtin-free'])
|
'-fno-builtin-realloc', '-fno-builtin-free'])
|
||||||
|
|
||||||
if compareVersions(env['CXXVERSION'], "9") < 0:
|
|
||||||
# `libstdc++fs`` must be explicitly linked for `std::filesystem``
|
|
||||||
# in GCC version 8. As of GCC version 9, this is not required.
|
|
||||||
#
|
|
||||||
# In GCC 7 the `libstdc++fs`` library explicit linkage is also
|
|
||||||
# required but the `std::filesystem` is under the `experimental`
|
|
||||||
# namespace(`std::experimental::filesystem`).
|
|
||||||
#
|
|
||||||
# Note: gem5 does not support GCC versions < 7.
|
|
||||||
env.Append(LIBS=['stdc++fs'])
|
|
||||||
|
|
||||||
elif env['CLANG']:
|
elif env['CLANG']:
|
||||||
if compareVersions(env['CXXVERSION'], "6") < 0:
|
if compareVersions(env['CXXVERSION'], "6") < 0:
|
||||||
error('clang version 6 or newer required.\n'
|
error('clang version 6 or newer required.\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user