Import('*')
-from m5.util.terminal import termcap
from m5.util.grammar import Grammar
-from gem5_scons import Transform
+from gem5_scons import Transform, warning, error
import os.path
if env['USE_ARM_FASTMODEL']:
if not env['USE_SYSTEMC']:
- print(termcap.Yellow + termcap.Bold +
- 'Warning: ARM Fast Models require systemc support' +
- termcap.Normal)
+ warning('ARM Fast Models require systemc support')
env['USE_ARM_FASTMODEL'] = False
Return()
def extract_var(name):
if name not in env:
- print(termcap.Red + termcap.Bold +
- ('Error: %s is not set' % name) +
- termcap.Normal)
- Exit(1)
+ error('Error: %s is not set' % name)
print('%s = %s' % (name, env[name]))
# Make sure the value of this variable shows up as an environment variable
# for commands scons runs.
Import('*')
from m5.util import compareVersions
-from m5.util.terminal import termcap
+
+from gem5_scons import warning
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)
+ warning('Systemc may not work on gcc versions less than 5.0.')
return False
elif env['PLATFORM'] == 'darwin':
if warn:
- print(termcap.Yellow + termcap.Bold +
- 'Warning: Systemc may not work on Mac OS.' + termcap.Normal)
+ warning('Warning: Systemc may not work on Mac OS.')
return False
return True