29a30,49
> from m5.util import compareVersions
> from m5.util.terminal import termcap
>
> def use_systemc_check(env, warn=False):
> if ('GCC_VERSION' in env and
> compareVersions(env['GCC_VERSION'], '5.0') < 0):
> if warn:
> print(termcap.Yellow + termcap.Bold +
> 'Warning: Systemc may not work on gcc versions less '
> 'than 5.0.' + termcap.Normal)
> return False
> elif env['PLATFORM'] == 'darwin':
> if warn:
> print(termcap.Yellow + termcap.Bold +
> 'Warning: Systemc may not work on Mac OS.' + termcap.Normal)
> return False
> return True
>
> main.AddMethod(use_systemc_check, 'UseSystemcCheck')
>
31c51,52
< BoolVariable('USE_SYSTEMC', 'Enable SystemC API support', True)
---
> BoolVariable('USE_SYSTEMC', 'Enable SystemC API support',
> main.UseSystemcCheck())