summaryrefslogtreecommitdiff
path: root/src/python/m5
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-01-09 18:08:20 -0600
committerAndreas Hansson <andreas.hansson@arm.com>2012-01-09 18:08:20 -0600
commit59b7cad3ec6ae02f53b53865b365101b1856bb93 (patch)
treec10cc7a6de4aa21d3cfc53a28b88529182733fbd /src/python/m5
parentc2dbfc1d6ca677f9b6fb8eaa60e4003a903e26bd (diff)
downloadgem5-59b7cad3ec6ae02f53b53865b365101b1856bb93.tar.xz
SWIG: Make gem5 compile and link with swig 2.0.4
To make gem5 compile and run with swig 2.0.4 a few minor fixes are necessary, the fail label issues by swig must not be treated as an error by gcc (tested with gcc 4.2.1), and the vector wrappers must have SWIGPY_SLICE_ARG defined which happens in pycontainer.swg, included through std_container.i. By adding the aforementioned include to the vector wrappers everything seems to work.
Diffstat (limited to 'src/python/m5')
-rw-r--r--src/python/m5/params.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index ee3678dc9..03917d085 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -256,6 +256,9 @@ class VectorParamDesc(ParamDesc):
self.ptype.cxx_predecls(code)
code('%}')
code()
+ # Make sure the SWIGPY_SLICE_ARG is defined through this inclusion
+ code('%include "std_container.i"')
+ code()
self.ptype.swig_predecls(code)
code()
code('%include "std_vector.i"')