summaryrefslogtreecommitdiff
path: root/src/SConscript
AgeCommit message (Collapse)Author
2017-11-28scons: Build GTests in the directory they're declared.Gabe Black
This will let us move unit tests into the directory of the code they're testing. Change-Id: I611582eb00a06a848f3ce7da89f64e42660cb844 Reviewed-on: https://gem5-review.googlesource.com/6141 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-11-28scons: Add in a new type of unit test called GTest.Gabe Black
This type of unit test is almost the same as UnitTest, except that it builds in the googletest library with the appropriate flags, and it also omits all the gem5 object files by default. Change-Id: I230db7ede563a73a9da0ebeed44aca389f724465 Reviewed-on: https://gem5-review.googlesource.com/6084 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-11-28scons: Minor cleanup of how partial linking is handled in makeEnv.Gabe Black
Git rid of the unused partial_objs variable, and change append to extend since the result of builders is a list of nodes and not individual nodes, even if there's only one target. Change-Id: Ie51225d3ea699eb7da18199ac3bf3e868e3994a6 Reviewed-on: https://gem5-review.googlesource.com/5985 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-11-27scons: Break make_obj into make_static and make_shared functions.Gabe Black
The make_obj function took a boolean value which just selected which of the two lines it in would actually do something. This change breaks it into two lambdas, make_static and make_shared, which just do whichever line would have been requested, making the funciton name more self descriptive and getting rid of the generally unnamed and opaque boolean argument. Change-Id: I457e40034b7e7f5a3e7294a8e1f15bbd42e0720e Reviewed-on: https://gem5-review.googlesource.com/5984 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-11-27scons: Remove the extra_deps option from the helper function make_obj.Gabe Black
This had only one use, and made the function more complicated than it needed to be. Change-Id: I22147a0c1239b457c577a6a24b423065e539833b Reviewed-on: https://gem5-review.googlesource.com/5983 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-11-27scons: Get rid of a flag which makes Werror optional.Gabe Black
This flag wasn't being used. Also move the Werror code to the SConstruct now that it's being applied universally. Change-Id: I18b00d4b41bc1add9271ca299c020c14970a6926 Reviewed-on: https://gem5-review.googlesource.com/5982 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-11-27scons: Move some compiler flag setting code to the SConstruct.Gabe Black
These settings are invariant, so there's no reason to apply them over and over again for the child environments used for various build products. Change-Id: Icb4053105e4f1c43008f2422ba30c7206b7ff365 Reviewed-on: https://gem5-review.googlesource.com/5981 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-11-27scons: Get rid of SourceFile's done function.Gabe Black
This function doesn't seem to be used by anything. A similar one off mechanism exists for SimObjects which is we might also be able to get rid of. Change-Id: I65038c3495fa69cf94042dc78f09876d5e9a557f Reviewed-on: https://gem5-review.googlesource.com/5841 Maintainer: Gabe Black <gabeblack@google.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2017-11-27scons: Switch from "guards" to "tags" on source files.Gabe Black
Tags are just arbitrary strings which are attached to source files which mark them as having some property. By default, all source files have the "gem5 lib" tag added to them which marks them as part of the gem5 library, the primary component of the gem5 binary but also a seperable component for use in, for example, system C. The tags can be completely overridden by setting the "tags" parameter on Source, etc., functions, and can be augmented by setting "add_tags" which are tags that will be added, or alternatively additional tags. It's possible to specify both, in which case the tags will be set to the union of tags and add_tags. add_tags is supposed to be a way to add extra tags to the default without actually overriding the default. Both tags and add_tags can be a list/tuple/etc of tags, or a single string which will be converted into a set internally. Other existing tags include: 1. "python" for files that need or are used with python and are excluded when the --without-python option is set 2. "main" for the file(s) which implement the gem5 binary's main function. 3. The name of a unit test to group its files together. 4. Tags which group source files for partial linking. By grouping the "tags" into a single parameter instead of taking all extra parameters as tags, the extra parameters can, in the future, be passed to the underlying scons environment. Also, the tags are either present or not. With guards, they could be present and True, present and False, or not present at all. Change-Id: I6d0404211a393968df66f7eddfe019897b6573a2 Reviewed-on: https://gem5-review.googlesource.com/5822 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-11-10scons: Move Transform and termcap functionality into their own files.Gabe Black
Change-Id: Ica08e93f3873a7eafd02fe7d44c3bdbf0ce7f6b7 Reviewed-on: https://gem5-review.googlesource.com/5565 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2017-10-19scons: Fix the regression tests.Gabe Black
A recent scons cleanup introduced a small bug when setting the variant path of the regression test SConscript. When turned into a relative path, the directory can be interpreted differently depending on what it's considered relative to. When left as a scons node, there is no ambiguity. Change-Id: I162afdc4fcef81db096ec8304f81bc98fa6bf899 Reviewed-on: https://gem5-review.googlesource.com/5221 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
2017-10-17scons: Stop generating inc.d in the isa parser.Gabe Black
Generating dependency/build product information in the isa parser breaks scons idea of how a build is supposed to work. Arm twisting it into working forced a lot of false dependencies which slowed down the build. Change-Id: Iadee8c930fd7c80136d200d69870df7672a6b3ca Reviewed-on: https://gem5-review.googlesource.com/5081 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
2017-06-06scons: Try to handle problems with gcc, lto and partial linking.Gabe Black
gcc has had a lot of problems with incremental linking and partial linking at the same time. Basically, the partial link assumes that it's the only link that's going to happen, and it converts weak external symbols into regular external symbols. Then when the real final link happens, those symbols are duplicated and the link fails. Versions of gcc 6 and greater add an option called -flinker-output which lets you tell the linker to do an incremental link. Unfortunately, other bugs make that fail, and so gcc 6 doesn't work either. Hopefully version 7 works better. A --force-lto option was added so that, when only one of lto and partial linking is available, you can switch from having partial linking to having lto. Change-Id: I5e293f5cfb07a14343dc74030d99cb161fb8bbbe Reviewed-on: https://gem5-review.googlesource.com/3680 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-05-08scons: Get rid of the PHONY_BASE construction variable.Gabe Black
The value of that variable can be computed more directly and more locally to where it's consumed. Change-Id: I5ca1f732a34e22d4dae2aeb6ee7fc8adebe1caa0 Reviewed-on: https://gem5-review.googlesource.com/2981 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2017-05-08scons: Replace str(foo.get_contents()) with foo.get_text_contents().Gabe Black
For Value() nodes, the get_contents() method and the get_text_contents() method are just aliases to the same thing, both of which return a value which has already been converted using str(). The str() which was included explicitly in the SConscript was redundant, except that it showed that the value from get_contents was being treated as a string. To avoid the redundancy but to still leave a hint to the value's type, this change converts those bits of code to use get_text_contents() and removes the str(). Change-Id: I8f7da9b652f749e741b553c9a0e2248ae15ec3ca Reviewed-on: https://gem5-review.googlesource.com/3084 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-05-08scons: Make env['USE_PYTHON'] a source for createEnumStrings.Gabe Black
That clues scons in to the fact that the contents of the target of that function depends on the value of that construction variable. Change-Id: I803322ea1a178152da3d95dffffe20acd4271c88 Reviewed-on: https://gem5-review.googlesource.com/3083 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Paul Rosenfeld <prosenfeld@micron.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-05-03scons: Merge reading test SConscripts into makeEnv.Gabe Black
We're already visiting each of the environments, there's no reason to track them all and then set up test SConscripts on a second pass. Change-Id: I2d1166f58ac907e874d6ad5de7bd53ff7ad645f8 Reviewed-on: https://gem5-review.googlesource.com/2980 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-05-02python: Use PyBind11 instead of SWIG for Python wrappersAndreas Sandberg
Use the PyBind11 wrapping infrastructure instead of SWIG to generate wrappers for functionality that needs to be exported to Python. This has several benefits: * PyBind11 can be redistributed with gem5, which means that we have full control of the version used. This avoid a large number of hard-to-debug SWIG issues we have seen in the past. * PyBind11 doesn't rely on a custom C++ parser, instead it relies on wrappers being explicitly declared in C++. The leads to slightly more boiler-plate code in manually created wrappers, but doesn't doesn't increase the overall code size. A big benefit is that this avoids strange compilation errors when SWIG doesn't understand modern language features. * Unlike SWIG, there is no risk that the wrapper code incorporates incorrect type casts (this has happened on numerous occasions in the past) since these will result in compile-time errors. As a part of this change, the mechanism to define exported methods has been redesigned slightly. New methods can be exported either by declaring them in the SimObject declaration and decorating them with the cxxMethod decorator or by adding an instance of PyBindMethod/PyBindProperty to the cxx_exports class variable. The decorator has the added benefit of making it possible to add a docstring and naming the method's parameters. The new wrappers have the following known issues: * Global events can't be memory managed correctly. This was the case in SWIG as well. Change-Id: I88c5a95b6cf6c32fa9e1ad31dfc08b2e8199a763 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Andrew Bardsley <andrew.bardsley@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2231 Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Pierre-Yves PĂ©neau <pierre-yves.peneau@lirmm.fr> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2017-05-01scons: Remove the SPAWN hack added earlier.Gabe Black
A previous change forced scons to spawn child processes by exec-ing it directly rather than going through the shell because the command line length would be too long for the shell to handle. Now that incremental linking should keep the command line lengths more under control, that change should no longer be necessary. Change-Id: I9e82a62083afd1414324a7fd697bd6d4b76367ae Reviewed-on: https://gem5-review.googlesource.com/2947 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-05-01scons: Group Source-s based on what SConscript included them.Gabe Black
The groups won't be perfectly balanced or optimally planned, but this requires no thought and breaks the object files down into a reasonable number of reasonably sized groups. Change-Id: I6542fc807aaf356a9be751093f68e2e29f0b1586 Reviewed-on: https://gem5-review.googlesource.com/2946 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-05-01scons: Put Source objects in groups and partially link them.Gabe Black
The groups will be linked together into intermediate partially linked object files. Right now the hierarchy is assumed to be flat, but with some effort it could be extended to allow truly hierarchical linking. Change-Id: I77b77710554e5f05e8b00720a0170afaf4afac2d Reviewed-on: https://gem5-review.googlesource.com/2945 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2017-04-14scons: When spawning the linker process, don't involve the shell.Gabe Black
The command line can be too long, causing bash to choke. This means we can't use any shell syntax like shell variables or redirection when linking, but that should be easy to avoid. Change-Id: Ie6c8ecab337cef6bd3c7e403346ced06f46f0993 Reviewed-on: https://gem5-review.googlesource.com/2780 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Steve Reinhardt <stever@gmail.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2017-01-27python: Move native wrappers to the _m5 namespaceAndreas Sandberg
Swig wrappers for native objects currently share the _m5.internal name space with Python code. This is undesirable if we ever want to switch from Swig to some other framework for native binding (e.g., PyBind11 or Boost::Python). This changeset moves all of such wrappers to the _m5 namespace, which is now reserved for native code. Change-Id: I2d2bc12dbc05b57b7c5a75f072e08124413d77f3 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2016-11-28scons: fix sanitizer flags with multiple sanitizersJoe Gross
There has been some problem when using address and undefined-behavior sanitizers at the same time. This patch will look for the special case where both are enabled at once and change the flags passed to the compiler to reflect this.
2016-06-28scons: Track swig packages when loading embedded swig codeAndreas Hansson
This patch changes how the embedded swig code is loaded to ensure that gem5 works with swig 3.0.9. For Python 2.7 and above, swig 3.0.9 now relies on importlib, and actually looks in the appropriate packages, even for the wrapped C code. However, the swig wrapper does not explicitly place the module in the right package (it just calls Py_InitModule), and we have to take explicit action to ensure that the swig code can be loaded. This patch adds the information to the generated wrappers and the appropriate calls to set the context as part of the swig initialisation. Previous versions of swig used to fall back on looking in the global namespace for the wrappers (and still do for Python 2.6), but technically things should not work without the functionality in this patch.
2016-05-30scons: Bump minimum gcc version to 4.8Andreas Hansson
After reaching consensus on the mailing list, this patch officially makes gcc 4.8 the minimum. A few checks in the SConstruct are cleaned up as a result. This patch also adds "-fno-omit-frame-pointer" when using ASAN (which is part of the gcc/clang recommended flags).
2016-03-13scons: fix building in non-standard locationsSteve Reinhardt
It's apparently not widely known that our scons scripts allow you to put the build directory wherever you want; not only does it not have to be immediately under the root of your repo, it doesn't even have to be underneath the root at all. (For example, sometimes it's useful to build on a local disk if your repo is on a slow NFS mount.) I point this out because this functionality has been broken for close to two years but no one seems to have noticed yet. This patch fixes an assumption that crept in in changeset be0e1724eb39 (May 09 2014) that the build dir would be immediately under the top level of the repo, preventing builds anywhere else.
2016-02-17scons: Enable building with the gcc/clang Address SanitizerAndreas Hansson
Allow the user to easily build gem5 with the Address Sanitizer, part of both gcc and clang these days.
2016-02-08scons: always generate sim/tags.ccCurtis Dunham
Due to insufficient build deps, the checkpoint tags might not get updated; this commit solves this. Due to the uncommon nature of the build target, regenerating tags.cc is a fairly clean solution. Since SCons hashes file contents, it won't recompile anything unless a new checkpoint upgrader is actually added. --HG-- extra : amend_source : ed3879da7668554693f697076deaf5029cc9b954
2016-01-19gpu-compute: AMD's baseline GPU modelTony Gutierrez
2016-01-11scons: Enable -Wextra by defaultAndreas Hansson
Make best use of the compiler, and enable -Wextra as well as -Wall. There are a few issues that had to be resolved, but they are all trivial.
2015-09-02sim: tag-based checkpoint versioningCurtis Dunham
This commit addresses gem5 checkpoints' linear versioning bottleneck. Since development is distributed across many private trees, there exists a sort of 'race' for checkpoint version numbers: internally a checkpoint version may be used but then resynchronizing with the external tree causes a conflict on that version. This change replaces the linear version number with a set of unique strings called tags. Now the only conflicts that can arise are of tag names, where collisions are much easier to avoid. The checkpoint upgrader (util/cpt_upgrader.py) upgrades the version representation, as one would expect. Each tag version implements its upgrader code in a python file in the util/cpt_upgraders directory rather than adding a function to the upgrader script itself. The version tags are stored in the 'Globals' section rather than 'root' (as the version was previously) because 'Globals' gets unserialized first and can provide a warning before any other unserialization errors can occur.
2015-07-03scons: Bump compiler requirement to gcc >= 4.7 and clang >= 3.1Andreas Hansson
This patch updates the compiler minimum requirement to gcc 4.7 and clang 3.1, thus allowing: 1. Explicit virtual overrides (no need for M5_ATTR_OVERRIDE) 2. Non-static data member initializers 3. Template aliases 4. Delegating constructors This patch also enables a transition from --std=c++0x to --std=c++11.
2015-02-11base: Add compiler macros to add deprecation warningsAndreas Sandberg
Gcc and clang both provide an attribute that can be used to flag a function as deprecated at compile time. This changeset adds a gem5 compiler macro for that compiler feature. The macro can be used to indicate that a legacy API within gem5 has been deprecated and provide a graceful migration to the new API.
2015-02-11base: Do not dereference NULL in CompoundFlag creationAndreas Hansson
This patch fixes the CompoundFlag constructor, ensuring that it does not dereference NULL. Doing so has undefined behaviuor, and both clang and gcc's undefined-behaviour sanitiser was rather unhappy.
2014-12-02scons: Ensure dictionary iteration is sorted by keyAndreas Hansson
This patch adds sorting based on the SimObject name or parameter name for all situations where we iterate over dictionaries. This should ensure a deterministic and consistent order across the host systems and hopefully avoid regression results differing across python versions.
2014-10-16arch,x86,mem: Dynamically determine the ISA for Ruby store checkAndreas Hansson
This patch makes the memory system ISA-agnostic by enabling the Ruby Sequencer to dynamically determine if it has to do a store check. To enable this check, the ISA is encoded as an enum, and the system is able to provide the ISA to the Sequencer at run time. --HG-- rename : src/arch/x86/insts/microldstop.hh => src/arch/x86/ldstflags.hh
2014-10-16config: Add the ability to read a config file using C++ and PythonAndreas Hansson
This patch adds the ability to load in config.ini files generated from gem5 into another instance of gem5 built without Python configuration support. The intended use case is for configuring gem5 when it is a library embedded in another simulation system. A parallel config file reader is also provided purely in Python to demonstrate the approach taken and to provided similar functionality for as-yet-unknown use models. The Python configuration file reader can read both .ini and .json files. C++ configuration file reading: A command line option has been added for scons to enable C++ configuration file reading: --with-cxx-config There is an example in util/cxx_config that shows C++ configuration in action. util/cxx_config/README explains how to build the example. Configuration is achieved by the object CxxConfigManager. It handles reading object descriptions from a CxxConfigFileBase object which wraps a config file reader. The wrapper class CxxIniFile is provided which wraps an IniFile for reading .ini files. Reading .json files from C++ would be possible with a similar wrapper and a JSON parser. After reading object descriptions, CxxConfigManager creates SimObjectParam-derived objects from the classes in the (generated with this patch) directory build/ARCH/cxx_config CxxConfigManager can then build SimObjects from those SimObjectParams (in an order dictated by the SimObject-value parameters on other objects) and bind ports of the produced SimObjects. A minimal set of instantiate-replacing member functions are provided by CxxConfigManager and few of the member functions of SimObject (such as drain) are extended onto CxxConfigManager. Python configuration file reading (configs/example/read_config.py): A Python version of the reader is also supplied with a similar interface to CxxConfigFileBase (In Python: ConfigFile) to config file readers. The Python config file reading will handle both .ini and .json files. The object construction strategy is slightly different in Python from the C++ reader as you need to avoid objects prematurely becoming the children of other objects when setting parameters. Port binding also needs to be strictly in the same port-index order as the original instantiation.
2014-10-16scons: Add Undefined Behavior Sanitizer (UBSan) optionAndreas Hansson
This patch adds the Undefined Behavior Sanitizer (UBSan) for clang and gcc >= 4.9. Due to the performance impact, the usage is guarded by a command-line option.
2014-08-12scons: Generate a single debug flag C++ fileCurtis Dunham
Reduces target count/compiler invocations by ~180.
2014-10-16scons: create dummy target to have SWIG generate C++ classesCurtis Dunham
scons build/<arch>/swig
2014-10-16config: Add a --without-python option to build processAndrew Bardsley
Add the ability to build libgem5 without embedded Python or the ability to configure with Python. This is a prelude to a patch to allow config.ini files to be loaded into libgem5 using only C++ which would make embedding gem5 within other simulation systems easier. This adds a few registration interfaces to things which cross between Python and C++. Namely: stats dumping and SimObject resolving
2014-08-13scons: Silence clang 3.4 warnings on Ubuntu 12.04Andreas Sandberg
This changeset fixes three types of warnings that occur in clang 3.4 on Ubuntu 12.04: * Certain versions of libstdc++ (primarily 4.8) use struct and class interchangeably. This triggers a warning in clang. * Swig has a tendency to generate code with the register class which was deprecated in C++11. This triggers a deprecation warning in clang. * Swig sometimes generates Python wrapper code which returns uninitialized values. It's unclear if this is actually a problem (the cases might be limited to failure paths). We'll silence these warnings for now since there is little we can do about the generated code.
2014-06-10scons: Bump the compiler version to gcc 4.6 and clang 3.0Andreas Hansson
This patch bumps the supported version of gcc from 4.4 to 4.6, and clang from 2.9 to 3.0. This enables, amongst other things, range-based for loops, lambda expressions, etc. The STL implementation shipping with 4.6 also has a full functional implementation of unique_ptr and shared_ptr.
2014-05-09arch: teach ISA parser how to split code across filesCurtis Dunham
This patch encompasses several interrelated and interdependent changes to the ISA generation step. The end goal is to reduce the size of the generated compilation units for instruction execution and decoding so that batch compilation can proceed with all CPUs active without exhausting physical memory. The ISA parser (src/arch/isa_parser.py) has been improved so that it can accept 'split [output_type];' directives at the top level of the grammar and 'split(output_type)' python calls within 'exec {{ ... }}' blocks. This has the effect of "splitting" the files into smaller compilation units. I use air-quotes around "splitting" because the files themselves are not split, but preprocessing directives are inserted to have the same effect. Architecturally, the ISA parser has had some changes in how it works. In general, it emits code sooner. It doesn't generate per-CPU files, and instead defers to the C preprocessor to create the duplicate copies for each CPU type. Likewise there are more files emitted and the C preprocessor does more substitution that used to be done by the ISA parser. Finally, the build system (SCons) needs to be able to cope with a dynamic list of source files coming out of the ISA parser. The changes to the SCons{cript,truct} files support this. In broad strokes, the targets requested on the command line are hidden from SCons until all the build dependencies are determined, otherwise it would try, realize it can't reach the goal, and terminate in failure. Since build steps (i.e. running the ISA parser) must be taken to determine the file list, several new build stages have been inserted at the very start of the build. First, the build dependencies from the ISA parser will be emitted to arch/$ISA/generated/inc.d, which is then read by a new SCons builder to finalize the dependencies. (Once inc.d exists, the ISA parser will not need to be run to complete this step.) Once the dependencies are known, the 'Environments' are made by the makeEnv() function. This function used to be called before the build began but now happens during the build. It is easy to see that this step is quite slow; this is a known issue and it's important to realize that it was already slow, but there was no obvious cause to attribute it to since nothing was displayed to the terminal. Since new steps that used to be performed serially are now in a potentially-parallel build phase, the pathname handling in the SCons scripts has been tightened up to deal with chdir() race conditions. In general, pathnames are computed earlier and more likely to be stored, passed around, and processed as absolute paths rather than relative paths. In the end, some of these issues had to be fixed by inserting serializing dependencies in the build. Minor note: For the null ISA, we just provide a dummy inc.d so SCons is never compelled to try to generate it. While it seems slightly wrong to have anything in src/arch/*/generated (i.e. a non-generated 'generated' file), it's by far the simplest solution.
2013-11-15cpu: allow the fetch buffer to be smaller than a cache lineAnthony Gutierrez
the current implementation of the fetch buffer in the o3 cpu is only allowed to be the size of a cache line. some architectures, e.g., ARM, have fetch buffers smaller than a cache line, see slide 22 at: http://www.arm.com/files/pdf/at-exploring_the_design_of_the_cortex-a15.pdf this patch allows the fetch buffer to be set to values smaller than a cache line.
2013-10-17build: Place proto output in the same directory, also for EXTRASAndreas Hansson
This patch changes the ProtoBuf builder such that the generated source and header is placed in the build directory of the proto file. This was previously not the case for the directories included as EXTRAS. To make this work, we also ensure that the build directory for the EXTRAS are added to the include path (which does not seem to automatically be the case).
2013-03-27scons: don't die on warnings in swig-generated codeSteve Reinhardt
There's not much to do about it other than disable the offending warning anyway, so it's not worth terminating the build over. Also suppress uninitialized variable warnings on gcc (happens at least with gcc 4.4 and swig 1.3.40).
2013-02-19scons: Unify the flags shared by gcc and clangAndreas Hansson
This patch restructures and unifies the flags used by gcc and clang as they are largely the same. The common parts are now dealt with in a shared block of code, and the few bits and pieces that are specifically affecting either gcc or clang are done separately.
2013-02-19scons: Add warning delete with non-virtual destructorAndreas Hansson
This patch enables a warning for deleting derived classes that do not have a virtual destructor. The patch merely adds additional checks, and there are currently no cases that had to be fixed.