Added code using VPtr to be able to extract info from linux thread
[gem5.git] / SConscript
index f6875a630d3ce03bd003d14b10123ec3b721bac4..19bb0f2bd6b361844ce7c86d6cfdc5c8e94d5129 100644 (file)
@@ -377,8 +377,16 @@ else:
     sources += syscall_emulation_sources
     obj_desc_files += syscall_emulation_obj_desc_files
 
+extra_libraries = []
 if env['USE_MYSQL']:
     sources += mysql_sources
+    env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
+    env.Append(LIBS=['z'])
+    if sys.platform.lower().startswith('linux'):
+        extra_libraries.append('/usr/lib/mysql/libmysqlclient.a')
+    else:
+        env.Append(LIBS=['mysql'])
+        env.Append(LIBPATH=['/usr/local/lib/mysql/'])
 
 ###################################################
 #
@@ -420,7 +428,9 @@ env.Command('targetarch', None, link_targetarch)
 
 
 # libelf build is described in its own SConscript file.
-SConscript('libelf/SConscript', exports = 'env', duplicate=0)
+# SConscript-local is the per-config build, which just copies some
+# header files into a place where they can be found.
+SConscript('libelf/SConscript-local', exports = 'env', duplicate=0)
 
 SConscript('sim/pyconfig/SConscript', exports = ['env', 'obj_desc_files'],
            duplicate=0)
@@ -440,6 +450,7 @@ def make_objs(sources, env):
     date_obj = env.Object('base/date.cc')
     env.Depends(date_obj, objs)
     objs.append(date_obj)
+    objs.extend(extra_libraries)
     return objs
 
 ###################################################