From 21cf4a46b9e9ce52266aac873aa107cad82cc847 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Sat, 4 Nov 2006 21:41:01 -0500 Subject: fixes so that M5 will compile under solaris SConstruct: Add check to see if we need to include libsocket src/arch/sparc/floatregfile.cc: src/arch/sparc/intregfile.cc: use memset rather than bzero and include the appropriate headerfile src/base/pollevent.cc: If we're compling under solaris we need sys/file.h src/base/random.cc: src/base/random.hh: solaris doesn't have random(), so use rint with the correct rounding mode if we're compiling on solaris src/base/stats/flags.hh: u_int32_t?? src/base/time.hh: grab the timersub() define from freebsd since it doesn't exist in solaris src/cpu/inst_seq.hh: we don't need to include stdint here src/sim/byteswap.hh: the method to detect endianness on Solaris is a little more complex... --HG-- extra : convert_revision : 6b7db0e900e7bccfc250d65c125065f27280dda1 --- SConstruct | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index dac4d137c..ce5ab4bb8 100644 --- a/SConstruct +++ b/SConstruct @@ -270,6 +270,12 @@ if not conf.CheckLib(py_version_name): print "Error: can't find Python library", py_version_name Exit(1) +# On Solaris you need to use libsocket for socket ops +if not conf.CheckLibWithHeader(None, 'sys/socket.h', 'C', 'accept(0,NULL,NULL);'): + if not conf.CheckLibWithHeader('socket', 'sys/socket.h', 'C', 'accept(0,NULL,NULL);'): + print "Can't find library with socket calls (e.g. accept())" + Exit(1) + # Check for zlib. If the check passes, libz will be automatically # added to the LIBS environment variable. if not conf.CheckLibWithHeader('z', 'zlib.h', 'C++'): -- cgit v1.2.3 From 430622c173b676c7a53aa5623d5197a26f9c9190 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 6 Nov 2006 10:15:27 -0500 Subject: replace NULL with 0.... Why isn't NULL defined by default on Mac OS X I don't know --HG-- extra : convert_revision : b60403445bd4e855732fd4e6753068abd90ecc9d --- SConstruct | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index ce5ab4bb8..59d40d5cc 100644 --- a/SConstruct +++ b/SConstruct @@ -271,8 +271,8 @@ if not conf.CheckLib(py_version_name): Exit(1) # On Solaris you need to use libsocket for socket ops -if not conf.CheckLibWithHeader(None, 'sys/socket.h', 'C', 'accept(0,NULL,NULL);'): - if not conf.CheckLibWithHeader('socket', 'sys/socket.h', 'C', 'accept(0,NULL,NULL);'): +if not conf.CheckLibWithHeader(None, 'sys/socket.h', 'C++', 'accept(0,0,0);'): + if not conf.CheckLibWithHeader('socket', 'sys/socket.h', 'C++', 'accept(0,0,0);'): print "Can't find library with socket calls (e.g. accept())" Exit(1) -- cgit v1.2.3 From eb4ef3ad763cf95a6437f9a88b1ab38255f5dcc3 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 7 Nov 2006 05:33:21 -0500 Subject: Made kern a switching header file directory. SConstruct: Put the code to make a switching header directory into a function so they are easy to make. src/arch/SConscript: Replace switching header code with the new function call. src/kern/SConscript: Created a new switching header directory in kern, and moved the declaration of some source files here. --HG-- rename : src/kern/kernel_stats.cc => src/kern/base_kernel_stats.cc rename : src/kern/kernel_stats.hh => src/kern/base_kernel_stats.hh extra : convert_revision : 98f5320a5ade567c3e4f67fef123dfb0c5122545 --- SConstruct | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 59d40d5cc..d047f99d3 100644 --- a/SConstruct +++ b/SConstruct @@ -459,6 +459,46 @@ env.SConscript('ext/libelf/SConscript', build_dir = os.path.join(build_root, 'libelf'), exports = 'env') +################################################### +# +# This function is used to set up a directory with switching headers +# +################################################### + +def make_switching_dir(dirname, switch_headers, env): + # Generate the header. target[0] is the full path of the output + # header to generate. 'source' is a dummy variable, since we get the + # list of ISAs from env['ALL_ISA_LIST']. + def gen_switch_hdr(target, source, env): + fname = str(target[0]) + basename = os.path.basename(fname) + f = open(fname, 'w') + f.write('#include "arch/isa_specific.hh"\n') + cond = '#if' + for isa in env['ALL_ISA_LIST']: + f.write('%s THE_ISA == %s_ISA\n#include "%s/%s/%s"\n' + % (cond, isa.upper(), dirname, isa, basename)) + cond = '#elif' + f.write('#else\n#error "THE_ISA not set"\n#endif\n') + f.close() + return 0 + + # String to print when generating header + def gen_switch_hdr_string(target, source, env): + return "Generating switch header " + str(target[0]) + + # Build SCons Action object. 'varlist' specifies env vars that this + # action depends on; when env['ALL_ISA_LIST'] changes these actions + # should get re-executed. + switch_hdr_action = Action(gen_switch_hdr, gen_switch_hdr_string, + varlist=['ALL_ISA_LIST']) + + # Instantiate actions for each header + for hdr in switch_headers: + env.Command(hdr, [], switch_hdr_action) + +env.make_switching_dir = make_switching_dir + ################################################### # # Define build environments for selected configurations. @@ -566,6 +606,7 @@ for build_path in build_paths: Help(help_text) + ################################################### # # Let SCons do its thing. At this point SCons will use the defined -- cgit v1.2.3 From f4aa4e43c41fa688abbee9dfa5b2a35a44b2dcf5 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Thu, 9 Nov 2006 08:43:35 -0800 Subject: Factor out all of the encumbered stuff into separate SConscript files so the directories can easily be deleted. Remove the FullCPU from the ALL_CPU_LIST and only add it if it exists. --HG-- extra : convert_revision : b16f56bb92a0063803c5099732dc289fe4363768 --- SConstruct | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index d047f99d3..35f88e04c 100644 --- a/SConstruct +++ b/SConstruct @@ -320,8 +320,10 @@ env['ALL_ISA_LIST'] = ['alpha', 'sparc', 'mips'] # Define the universe of supported CPU models env['ALL_CPU_LIST'] = ['AtomicSimpleCPU', 'TimingSimpleCPU', - 'FullCPU', 'O3CPU', - 'OzoneCPU'] + 'O3CPU', 'OzoneCPU'] + +if os.path.isdir(os.path.join(SRCDIR, 'src/encumbered/cpu/full')): + env['ALL_CPU_LIST'] += ['FullCPU'] # Sticky options get saved in the options file so they persist from # one invocation to the next (unless overridden, in which case the new -- cgit v1.2.3 From cb172d0332ecf4ff7f6329f1172d8e1cf78767e2 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 9 Nov 2006 18:22:46 -0500 Subject: Get SPARC to the point that it starts running. Add ability to load the ROM bin files, cleanup lockstep printing a bit Since we don't have a platform yet, you need to comment out the default responder stuff in Bus.py to make it work. SConstruct: Add TARGET_ISA to the list of environment variables that end up in the build_env for python configs/common/FSConfig.py: add a simple SPARC system to being testing with, you'll need to change makeLinuxAlphaSystem to makeSparcSystem in fs.py for now src/SConscript: add a raw file object, at least until we get more info about how to compile openboot properly src/arch/sparc/system.cc: src/arch/sparc/system.hh: add parameters for ROM files (OBP/Reset/Hypervisor), a ROM, load files into ROM src/base/loader/object_file.cc: src/base/loader/object_file.hh: add option to try raw when nothing works src/cpu/exetrace.cc: cleanup lockstep printing a little bit src/cpu/m5legion_interface.h: change the instruction to be 32 bits because it is src/mem/physical.cc: fix assert that doesn't work if memory starts somewhere above 0 src/python/m5/objects/BaseCPU.py: Add if statement to choose between sparc tlbs and alpha tlbs src/python/m5/objects/System.py: Add a sparc system that sets the rom addresses correctly src/python/m5/params.py: add the ability to add Addr() together --HG-- extra : convert_revision : bbbd8a56134f2dda2728091f740e2f7119b0c4af --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 35f88e04c..d3428e894 100644 --- a/SConstruct +++ b/SConstruct @@ -370,7 +370,7 @@ nonsticky_opts.AddOptions( # These options get exported to #defines in config/*.hh (see src/SConscript). env.ExportOptions = ['FULL_SYSTEM', 'ALPHA_TLASER', 'USE_FENV', \ 'USE_MYSQL', 'NO_FAST_ALLOC', 'SS_COMPATIBLE_FP', \ - 'USE_CHECKER', 'PYTHONHOME'] + 'USE_CHECKER', 'PYTHONHOME', 'TARGET_ISA'] # Define a handy 'no-op' action def no_action(target, source, env): -- cgit v1.2.3