summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-10-09 04:58:23 -0700
committerNathan Binkert <nate@binkert.org>2008-10-09 04:58:23 -0700
commita589eb4053d9a902f9e9047830955963aec94e64 (patch)
tree632750baf207005392f7cfc7ab170576dc04d18c /ext
parent0b83563a9c7368ffdb82d70054ceda3cb7f3828f (diff)
downloadgem5-a589eb4053d9a902f9e9047830955963aec94e64.tar.xz
SCons: add code to provide a libm5 shared library.
Targets look like libm5_debug.so. This target can be dynamically linked into another C++ program and provide just about all of the M5 features. Additionally, this library is a standalone module that can be imported into python with an "import libm5_debug" type command line.
Diffstat (limited to 'ext')
-rw-r--r--ext/libelf/SConscript5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript
index 3db526c13..ab85308de 100644
--- a/ext/libelf/SConscript
+++ b/ext/libelf/SConscript
@@ -110,7 +110,10 @@ m4env.M4(target=File('libelf_fsize.c'),
source=[File('elf_types.m4'), File('libelf_fsize.m4')])
m4env.M4(target=File('libelf_msize.c'),
source=[File('elf_types.m4'), File('libelf_msize.m4')])
-m4env.Library('elf', elf_files)
+
+# Build libelf as a static library with PIC code so it can be linked
+# into either m5 or the library
+m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files])
env.Append(CPPPATH=Dir('.'))
env.Append(LIBS=['elf'])