From c2dbfc1d6ca677f9b6fb8eaa60e4003a903e26bd Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 9 Jan 2012 18:08:20 -0600 Subject: MAC: Make gem5 compile and run on MacOSX 10.7.2 Adaptations to make gem5 compile and run on OSX 10.7.2, with a stock gcc 4.2.1 and the remaining dependencies from macports, i.e. python 2.7,.2 swig 2.0.4, mercurial 2.0. The changes include an adaptation of the SConstruct to handle non-library linker flags, and Darwin-specific code to find the memory usage of gem5. A number of Ruby files relied on ambigious uint (without the 32 suffix) which caused compilation errors. --- SConstruct | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 89761a4f1..0630cbd79 100755 --- a/SConstruct +++ b/SConstruct @@ -663,10 +663,14 @@ if not py_getvar('Py_ENABLE_SHARED'): py_libs = [] for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split(): - assert lib.startswith('-l') - lib = lib[2:] - if lib not in py_libs: - py_libs.append(lib) + if not lib.startswith('-l'): + # Python requires some special flags to link (e.g. -framework + # common on OS X systems), assume appending preserves order + main.Append(LINKFLAGS=[lib]) + else: + lib = lib[2:] + if lib not in py_libs: + py_libs.append(lib) py_libs.append(py_version) main.Append(CPPPATH=py_includes) -- cgit v1.2.3