scons,misc: Remove the ability to disable some trivial features.

These are HDF5, PNG, FENV, and TUNTAP support, all of which add
capabilities to gem5 which can be ignored if not wanted. It could be
argued that FENV changes behavior because it makes setting the FP
rounding mode work or not as used by SPARC, but since the difference is
trivial and in a niche area, that (along with the other options) doesn't
seem to justify having a top level control in the build system.

Since these are no longer options which say whether to *use* a
particular feature, and are instead flags which say whether we *have* a
particular feature, change their names from USE_* to HAVE_*, to stay
consistent with other variables.

Most of the remaining USE_* flags, KVM, FASTMODEL, SYSTEMC, and
(indirectly) USE_PYTHON, toggle on and off major systems which can have
a significant effect on boot time, or, in the case of FASTMODEL, even
consume external resources which may not be available and which may
break the build.

USE_POSIX_TIMER was also left alone since it selects between two
implementations of some functions. By forcing it to be on or off
depending on the host, we would be forcing some code to be excluded in
either case. That would make that other code impossible to test without
hacking up scons or modifying the host machine.

Change-Id: I0b03f23e65478caefd50cd3516974386e3dbf0db
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40964
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-02-08 01:23:09 -08:00
parent f2d3011333
commit d84123e106
11 changed files with 40 additions and 59 deletions

View File

@@ -38,20 +38,20 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config/use_hdf5.hh"
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
#include "base/statistics.hh"
#include "base/stats/text.hh"
#if USE_HDF5
#include "config/have_hdf5.hh"
#if HAVE_HDF5
#include "base/stats/hdf5.hh"
#endif
#include "sim/stat_control.hh"
#include "sim/stat_register.hh"
namespace py = pybind11;
static const py::object
@@ -106,7 +106,7 @@ pybind_init_stats(py::module_ &m_native)
m
.def("initSimStats", &Stats::initSimStats)
.def("initText", &Stats::initText, py::return_value_policy::reference)
#if USE_HDF5
#if HAVE_HDF5
.def("initHDF5", &Stats::initHDF5)
#endif
.def("registerPythonStatsHandlers",