scons: Switch from the print statement to the print function.
Starting with version 3, scons imposes using the print function instead of the print statement in code it processes. To get things building again, this change moves all python code within gem5 to use the function version. Another change by another author separately made this same change to the site_tools and site_init.py files. Change-Id: I2de7dc3b1be756baad6f60574c47c8b7e80ea3b0 Reviewed-on: https://gem5-review.googlesource.com/8761 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#
|
||||
# Authors: Nathan Binkert
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os, subprocess
|
||||
|
||||
Import('main')
|
||||
@@ -114,8 +116,8 @@ if m4env.Detect('gm4'):
|
||||
# Check that m4 is available
|
||||
import SCons.Tool.m4
|
||||
if not SCons.Tool.m4.exists(m4env):
|
||||
print "Error: Can't find version of M4 macro processor. " + \
|
||||
"Please install M4 and try again."
|
||||
print("Error: Can't find version of M4 macro processor. " +
|
||||
"Please install M4 and try again.")
|
||||
Exit(1)
|
||||
|
||||
m4env.Append(M4FLAGS=['-DSRCDIR=%s' % Dir('.').path])
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
# Authors: Christian Menard
|
||||
# Matthias Jung
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
from m5.util.terminal import get_termcap
|
||||
|
||||
@@ -57,8 +59,8 @@ elif conf.CheckDeclaration('__x86_64__'):
|
||||
arch = 'x86_64'
|
||||
else:
|
||||
termcap = get_termcap(GetOption('use_colors'))
|
||||
print termcap.Yellow + termcap.Bold + \
|
||||
"Warning: Unrecognized architecture for systemc." + termcap.Normal
|
||||
print(termcap.Yellow + termcap.Bold +
|
||||
"Warning: Unrecognized architecture for systemc." + termcap.Normal)
|
||||
|
||||
conf.Finish()
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
# Authors: Christian Menard
|
||||
# Matthias Jung
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
Import('systemc', 'SystemCSource')
|
||||
|
||||
SystemCSource(
|
||||
@@ -63,5 +65,5 @@ elif coroutine_lib == 'pthreads':
|
||||
elif coroutine_lib == 'fiber':
|
||||
SystemCSource('sc_cor_fiber.cpp')
|
||||
else:
|
||||
print 'Unrecognized threading implementation \'%s\'' % coroutine_lib
|
||||
print('Unrecognized threading implementation \'%s\'' % coroutine_lib)
|
||||
Exit(1)
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
# Authors: Christian Menard
|
||||
# Matthias Jung
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
|
||||
Import('systemc', 'SystemCSource')
|
||||
@@ -32,11 +34,11 @@ if systemc['COROUTINE_LIB'] == 'qt':
|
||||
|
||||
qt_arch = systemc.get('QT_ARCH', None)
|
||||
if not qt_arch:
|
||||
print 'No architecture selected for the QT coroutine library.'
|
||||
print('No architecture selected for the QT coroutine library.')
|
||||
Exit(1)
|
||||
|
||||
if qt_arch in ('i386', 'iX86_64'):
|
||||
SystemCSource(os.path.join('md', qt_arch + '.s'))
|
||||
else:
|
||||
print 'Don\'t know what to do for QT arch %s.' % qt_arch
|
||||
print('Don\'t know what to do for QT arch %s.' % qt_arch)
|
||||
Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user