summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2013-03-18 10:22:21 +0100
committerAndreas Sandberg <andreas@sandberg.pp.se>2013-03-18 10:22:21 +0100
commit3e3475138bbc1c4f1836d861a6b38e6d288a6720 (patch)
tree88854090d889da84444155311d72c4d7293a8aff /SConstruct
parentc01c5e971b020f106fa528bc2e41d4d3bd2cf640 (diff)
downloadgem5-3e3475138bbc1c4f1836d861a6b38e6d288a6720.tar.xz
scons: Include flags required to link statically with Python
Python requires the flags in LINKFORSHARED to be added the linker flags when linking with a statically with Python. Failing to do so can lead to errors from the Python's dynamic module loader at start up. --HG-- extra : rebase_source : e7a8daf72f4ede7ee5a4a5398a0b12e978a919b9
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct5
1 files changed, 5 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index a5a598660..15e49fba4 100755
--- a/SConstruct
+++ b/SConstruct
@@ -839,6 +839,11 @@ py_lib_path = [ py_getvar('LIBDIR') ]
# shared library in prefix/lib/.
if not py_getvar('Py_ENABLE_SHARED'):
py_lib_path.append(py_getvar('LIBPL'))
+ # Python requires the flags in LINKFORSHARED to be added the
+ # linker flags when linking with a statically with Python. Failing
+ # to do so can lead to errors from the Python's dynamic module
+ # loader at start up.
+ main.Append(LINKFLAGS=[py_getvar('LINKFORSHARED').split()])
py_libs = []
for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split():