scons: rename some things from m5 to gem5
The default generated binary is now gem5.<type> instead of m5.<type>. The latter does still work but gem5.<type> will be generated first and then m5.<type> will be hard linked to it.
This commit is contained in:
parent
0c424344fa
commit
f49f384fe4
|
@ -41,7 +41,7 @@ from os.path import basename, dirname, exists, isdir, isfile, join as joinpath
|
|||
|
||||
import SCons
|
||||
|
||||
# This file defines how to build a particular configuration of M5
|
||||
# This file defines how to build a particular configuration of gem5
|
||||
# based on variable settings in the 'env' build environment.
|
||||
|
||||
Import('*')
|
||||
|
@ -61,8 +61,8 @@ from m5.util import code_formatter
|
|||
# get specifies a set of filters, only files that match those filters
|
||||
# will be accepted (unspecified filters on files are assumed to be
|
||||
# false). Current filters are:
|
||||
# main -- specifies the m5 main() function
|
||||
# skip_lib -- do not put this file into the m5 library
|
||||
# main -- specifies the gem5 main() function
|
||||
# skip_lib -- do not put this file into the gem5 library
|
||||
# <unittest> -- unit tests use filters based on the unit test name
|
||||
#
|
||||
# A parent can now be specified for a source file and default filter
|
||||
|
@ -298,7 +298,7 @@ for extra_dir in extras_dir_list:
|
|||
env.Append(CPPPATH=Dir(extra_dir))
|
||||
|
||||
# Workaround for bug in SCons version > 0.97d20071212
|
||||
# Scons bug id: 2006 M5 Bug id: 308
|
||||
# Scons bug id: 2006 gem5 Bug id: 308
|
||||
for root, dirs, files in os.walk(base_dir, topdown=True):
|
||||
Dir(root[len(base_dir) + 1:])
|
||||
|
||||
|
@ -866,8 +866,9 @@ date_source = Source('base/date.cc', skip_lib=True)
|
|||
def makeEnv(label, objsfx, strip = False, **kwargs):
|
||||
# SCons doesn't know to append a library suffix when there is a '.' in the
|
||||
# name. Use '_' instead.
|
||||
libname = 'm5_' + label
|
||||
exename = 'm5.' + label
|
||||
libname = 'gem5_' + label
|
||||
exename = 'gem5.' + label
|
||||
secondary_exename = 'm5.' + label
|
||||
|
||||
new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's')
|
||||
new_env.Label = label
|
||||
|
@ -943,7 +944,10 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
|
|||
cmd = 'strip $SOURCE -o $TARGET'
|
||||
targets = new_env.Command(exename, progname,
|
||||
MakeAction(cmd, Transform("STRIP")))
|
||||
|
||||
|
||||
new_env.Command(secondary_exename, exename,
|
||||
MakeAction('ln $SOURCE $TARGET', Transform("HARDLINK")))
|
||||
|
||||
new_env.M5Binary = targets[0]
|
||||
envList.append(new_env)
|
||||
|
||||
|
|
Loading…
Reference in a new issue